Skip to content

Commit

Permalink
docs: fix imports in readme and example
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Oct 14, 2023
1 parent ff6f029 commit 8b7de3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If the stub is called with arguments that match `calledWith`, the configured beh

```ts
import { vi, test, afterEach } from 'vitest'
import { when } from ''
import { when } from 'vitest-when'

afterEach(() => {
vi.resetAllMocks()
Expand Down Expand Up @@ -122,7 +122,7 @@ See the [./example](./example) directory for example usage.
```ts
// meaning-of-life.test.ts
import { vi, describe, afterEach, it, expect } from 'vitest'
import { when } from '../src/vitest-when.ts'
import { when } from 'vitest-when'

import * as deepThought from './deep-thought.ts'
import * as earth from './earth.ts'
Expand Down
2 changes: 1 addition & 1 deletion example/meaning-of-life.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { vi, describe, afterEach, it, expect } from 'vitest'
import { when } from '../src/vitest-when.ts'
import { when } from 'vitest-when'

import * as deepThought from './deep-thought.ts'
import * as earth from './earth.ts'
Expand Down
5 changes: 5 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({
resolve: {
alias: {
'vitest-when': './src/vitest-when.ts',
},
},
test: {
coverage: {
provider: 'istanbul',
Expand Down

0 comments on commit 8b7de3d

Please sign in to comment.