[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

refactor: fix typos (#9950)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>

authored by

Copilot
copilot-swe-agent[bot]
Ari Perkkiö
and committed by
GitHub
(Mar 23, 2026, 10:21 AM +0200) 5a608685 aaf9f18a

+60 -60
+1 -1
docs/api/test.md
··· 223 223 - **Default:** `true` 224 224 - **Alias:** [`test.sequential`](#test-sequential) 225 225 226 - Whether tests run sequentially. When both `concurrent` and `sequential` are specified, `concurrent` takes precendence. 226 + Whether tests run sequentially. When both `concurrent` and `sequential` are specified, `concurrent` takes precedence. 227 227 228 228 ### skip 229 229
+1 -1
docs/config/environment.md
··· 82 82 ``` 83 83 84 84 ::: tip 85 - The `viteEnvironment` field corresponde to the environment defined by the [Vite Environment API](https://vite.dev/guide/api-environment#environment-api). By default, Vite exposes `client` (for the browser) and `ssr` (for the server) environments. 85 + The `viteEnvironment` field corresponds to the environment defined by the [Vite Environment API](https://vite.dev/guide/api-environment#environment-api). By default, Vite exposes `client` (for the browser) and `ssr` (for the server) environments. 86 86 ::: 87 87 88 88 Vitest also exposes `builtinEnvironments` through `vitest/environments` entry, in case you just want to extend it. You can read more about extending environments in [our guide](/guide/environment).
+1 -1
docs/config/experimental.md
··· 336 336 - `istanbul` coverage provider doesn't work because there is no transformation phase, use `v8` instead 337 337 338 338 ::: warning Coverage Support 339 - At the momemnt Vitest supports coverage via `v8` provider as long as files can be transformed into JavaScript. To transform TypeScript, Vitest uses [`module.stripTypeScriptTypes`](https://nodejs.org/api/module.html#modulestriptypescripttypescode-options) which is available in Node.js since v22.13. If you are using a custom [module loader](https://nodejs.org/api/module.html#customization-hooks), Vitest is not able to reuse it to transform files for analysis. 339 + At the moment Vitest supports coverage via `v8` provider as long as files can be transformed into JavaScript. To transform TypeScript, Vitest uses [`module.stripTypeScriptTypes`](https://nodejs.org/api/module.html#modulestriptypescripttypescode-options) which is available in Node.js since v22.13. If you are using a custom [module loader](https://nodejs.org/api/module.html#customization-hooks), Vitest is not able to reuse it to transform files for analysis. 340 340 ::: 341 341 342 342 With regards to mocking, it is also important to point out that ES modules do not support property override. This means that code like this won't work anymore:
+1 -1
docs/config/pool.md
··· 32 32 33 33 ```ts 34 34 try { 35 - fs.writeFileSync('/doesnt exist') 35 + fs.writeFileSync('/does-not-exist') 36 36 } 37 37 catch (err) { 38 38 console.log(err instanceof Error) // false
+1 -1
docs/config/tags.md
··· 102 102 Tags can define [test options](/api/test#test-options) that will be applied to every test marked with the tag. These options are merged with the test's own options, with the test's options taking precedence. 103 103 104 104 ::: warning 105 - The [`retry.condition`](/api/test#retry) can onle be a regexp because the config values need to be serialised. 105 + The [`retry.condition`](/api/test#retry) can only be a regexp because the config values need to be serialised. 106 106 107 107 Tags also cannot apply other [tags](/api/test#tags) via these options. 108 108 :::
+1 -1
test/core/vite.config.ts
··· 33 33 } 34 34 }, 35 35 }, 36 - // Use babel plugin since Oxc (Vite 8) doens't support ecma decorators out of the box 36 + // Use babel plugin since Oxc (Vite 8) doesn't support ecma decorators out of the box 37 37 // https://github.com/oxc-project/oxc/issues/9170#issuecomment-4072166491 38 38 !!rolldownVersion 39 39 && (import('@rolldown/plugin-babel').then(({ default: babel }) =>
+1 -1
test/test-utils/index.ts
··· 177 177 ...rest.env, 178 178 ...cliOptions?.env, 179 179 }, 180 - // override cache config with the one that was used to run `vitest` formt the CLI 180 + // override cache config with the one that was used to run `vitest` from the CLI 181 181 experimental: { 182 182 fsModuleCache: rest.experimental?.fsModuleCache ?? currentConfig.experimental.fsModuleCache, 183 183 ...cliOptions?.experimental,
+1 -1
docs/api/advanced/runner.md
··· 198 198 } 199 199 ``` 200 200 201 - Every task has a `suite` property that references a suite it is located in. If `test` or `describe` are initiated at the top level, they will not have a `suite` property (it will **not** be equal to `file`!). `File` also never has a `suite` property. It is useful to travers the tasks from the bottom up. 201 + Every task has a `suite` property that references a suite it is located in. If `test` or `describe` are initiated at the top level, they will not have a `suite` property (it will **not** be equal to `file`!). `File` also never has a `suite` property. It is useful to traverse the tasks from the bottom up. 202 202 203 203 ```ts 204 204 interface Test<ExtraContext = object> extends TaskBase {
+2 -2
docs/api/browser/assertions.md
··· 336 336 ```ts 337 337 const ancestor = getByTestId('ancestor') 338 338 const descendant = getByTestId('descendant') 339 - const nonExistantElement = getByTestId('does-not-exist') 339 + const nonExistingElement = getByTestId('does-not-exist') 340 340 341 341 await expect.element(ancestor).toContainElement(descendant) 342 342 await expect.element(descendant).not.toContainElement(ancestor) 343 - await expect.element(ancestor).not.toContainElement(nonExistantElement) 343 + await expect.element(ancestor).not.toContainElement(nonExistingElement) 344 344 ``` 345 345 346 346 ## toContainHTML
+1 -1
docs/api/browser/context.md
··· 241 241 ```ts 242 242 export const utils: { 243 243 /** 244 - * This is simillar to calling `page.elementLocator`, but it returns only 244 + * This is similar to calling `page.elementLocator`, but it returns only 245 245 * locator selectors. 246 246 */ 247 247 getElementLocatorSelectors(element: Element): LocatorSelectors
+1 -1
docs/config/browser/playwright.md
··· 164 164 When enabled, Vitest uses Playwright's [persistent context](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context) instead of a regular browser context. This allows browser state (cookies, localStorage, DevTools settings, etc.) to persist between test runs. 165 165 166 166 ::: warning 167 - This option is ignored when running tests in parallel (e.g. when headless with [`fileParallelism`](/config/fileparallelism) enalbed) since persistent context cannot be shared across parallel sessions. 167 + This option is ignored when running tests in parallel (e.g. when headless with [`fileParallelism`](/config/fileparallelism) enabled) since persistent context cannot be shared across parallel sessions. 168 168 ::: 169 169 170 170 - When set to `true`, the user data is stored in `./node_modules/.cache/vitest-playwright-user-data`
+1 -1
docs/guide/mocking/classes.md
··· 154 154 ::: 155 155 156 156 ::: danger 157 - Using classes with `vi.fn()` was introduced in Vitest 4. Previously, you had to use `function` and `prototype` inheritence directly. See [v3 guide](https://v3.vitest.dev/guide/mocking.html#classes). 157 + Using classes with `vi.fn()` was introduced in Vitest 4. Previously, you had to use `function` and `prototype` inheritance directly. See [v3 guide](https://v3.vitest.dev/guide/mocking.html#classes). 158 158 :::
+6 -6
packages/browser-playwright/src/playwright.ts
··· 260 260 } 261 261 262 262 private createMocker(): BrowserModuleMocker { 263 - const idPreficates = new Map<string, (url: URL) => boolean>() 263 + const idPredicates = new Map<string, (url: URL) => boolean>() 264 264 const sessionIds = new Map<string, string[]>() 265 265 266 266 function createPredicate(sessionId: string, url: string) { ··· 296 296 const ids = sessionIds.get(sessionId) || [] 297 297 ids.push(moduleUrl.href) 298 298 sessionIds.set(sessionId, ids) 299 - idPreficates.set(predicateKey(sessionId, moduleUrl.href), predicate) 299 + idPredicates.set(predicateKey(sessionId, moduleUrl.href), predicate) 300 300 return predicate 301 301 } 302 302 ··· 374 374 delete: async (sessionId: string, id: string): Promise<void> => { 375 375 const page = this.getPage(sessionId) 376 376 const key = predicateKey(sessionId, id) 377 - const predicate = idPreficates.get(key) 377 + const predicate = idPredicates.get(key) 378 378 if (predicate) { 379 - await page.context().unroute(predicate).finally(() => idPreficates.delete(key)) 379 + await page.context().unroute(predicate).finally(() => idPredicates.delete(key)) 380 380 } 381 381 }, 382 382 clear: async (sessionId: string): Promise<void> => { ··· 384 384 const ids = sessionIds.get(sessionId) || [] 385 385 const promises = ids.map((id) => { 386 386 const key = predicateKey(sessionId, id) 387 - const predicate = idPreficates.get(key) 387 + const predicate = idPredicates.get(key) 388 388 if (predicate) { 389 - return page.context().unroute(predicate).finally(() => idPreficates.delete(key)) 389 + return page.context().unroute(predicate).finally(() => idPredicates.delete(key)) 390 390 } 391 391 return null 392 392 })
+1 -1
packages/runner/src/run.ts
··· 482 482 const p = runner.onTaskUpdate?.(taskPacks, eventsPacks) 483 483 if (p) { 484 484 pendingTasksUpdates.push(p) 485 - // remove successful promise to not grow array indefnitely, 485 + // remove successful promise to not grow array indefinitely, 486 486 // but keep rejections so finishSendTasksUpdate can handle them 487 487 p.then( 488 488 () => pendingTasksUpdates.splice(pendingTasksUpdates.indexOf(p), 1),
+3 -3
packages/spy/src/index.ts
··· 245 245 originalImplementation?: T, 246 246 ): Mock<T> { 247 247 // if the function is already a mock, just return the same function, 248 - // simillarly to how vi.spyOn() works 248 + // similarly to how vi.spyOn() works 249 249 if (originalImplementation != null && isMockFunction(originalImplementation)) { 250 250 return originalImplementation as Mock<T> 251 251 } ··· 485 485 486 486 // jest calls this before the implementation, but we have to resolve this _after_ 487 487 // because we cannot do it before the `Reflect.construct` called the custom implementation. 488 - // fortunetly, the constructor is always an empty functon because `prototypeMethods` 488 + // fortunately, the constructor is always an empty function because `prototypeMethods` 489 489 // are only used by the automocker, so this doesn't matter 490 490 for (const prop of prototypeMembers) { 491 491 const prototypeMock = returnValue[prop] 492 - // the method was overidden because of inheritence, ignore it 492 + // the method was overridden because of inheritance, ignore it 493 493 // eslint-disable-next-line ts/no-use-before-define 494 494 if (prototypeMock !== mock.prototype[prop]) { 495 495 continue
+1 -1
test/browser/specs/runner.test.ts
··· 241 241 expect(stderr).toContain('Failure screenshot') 242 242 expect(stderr).toContain('__screenshots__/failing') 243 243 244 - expect(stderr).toContain('Access denied to "/inaccesible/path".') 244 + expect(stderr).toContain('Access denied to "/inaccessible/path".') 245 245 246 246 // depending on the browser it references either `.toBe()` or `expect()` 247 247 expect(stderr).toMatch(/failing.test.ts:11:(12|17)/)
+1 -1
test/browser/test/findElement.test.ts
··· 32 32 return locator.findElement({ timeout: 100 }) 33 33 }).rejects.toThrow('Cannot find element with locator: getByRole(\'button\')') 34 34 // Normally it would be 5: 35 - // Immidiate, 0 (next tick), 20, 50, 100 35 + // Immediate, 0 (next tick), 20, 50, 100 36 36 // But on CI it can be less because resources are limited 37 37 expect(elementsSpy.mock.calls.length).toBeGreaterThanOrEqual(3) 38 38 })
+1 -1
test/cli/test/mocking.test.ts
··· 55 55 root: path.join(import.meta.dirname, '../fixtures/invalid-package'), 56 56 }) 57 57 58 - // requires Vite 8 for relaxed import analysis validataion 58 + // requires Vite 8 for relaxed import analysis validation 59 59 // https://github.com/vitejs/vite/pull/21601 60 60 if (rolldownVersion) { 61 61 expect(stderr).toMatchInlineSnapshot(`""`)
+1 -1
test/cli/test/public-api.test.ts
··· 49 49 expect(stdout).toContain('custom.spec.ts:14:1 > custom') 50 50 51 51 const suiteMeta = { done: true } 52 - const testMeta = { custom: 'some-custom-hanlder' } 52 + const testMeta = { custom: 'some-custom-handler' } 53 53 54 54 expect(finishedTestCaseMetas).toHaveLength(3) 55 55 expect(finishedTestModuleMetas).toHaveLength(1)
+1 -1
test/core/test/jest-mock.test.ts
··· 175 175 176 176 spy.mockRestore() 177 177 178 - // Sicne Vitest 4 this is a special case where 178 + // Since Vitest 4 this is a special case where 179 179 // vi.fn(impl) will always return impl, unless overridden 180 180 expect(spy.getMockImplementation()).toBe(originalFn) 181 181
+1 -1
test/coverage-test/test/file-outside-vite.test.ts
··· 23 23 } 24 24 else { 25 25 // On istanbul the instrumentation happens on Vite plugin, so files 26 - // loaded outsite Vite should have 0% coverage 26 + // loaded outside Vite should have 0% coverage 27 27 expect(fileCoverage).toMatchInlineSnapshot(` 28 28 { 29 29 "branches": "0/0 (100%)",
+1 -1
packages/browser/src/node/plugin.ts
··· 334 334 }, 335 335 transform(code, id) { 336 336 if (id.includes(parentServer.vite.config.cacheDir) && id.includes('loupe.js')) { 337 - // loupe bundle has a nastry require('util') call that leaves a warning in the console 337 + // loupe bundle has a nasty require('util') call that leaves a warning in the console 338 338 const utilRequire = 'nodeUtil = require_util();' 339 339 return code.replace(utilRequire, ' '.repeat(utilRequire.length)) 340 340 }
+1 -1
packages/ui/client/composables/navigation.ts
··· 160 160 // TODO: find a way to make this universal - maybe show browser separately(?) 161 161 if (browserState?.provider === 'webdriverio') { 162 162 const parentWindow = window.outerWidth * (panels.details.size / 100) 163 - // 40 is 20px padding for each sice 163 + // 40 is 20px padding for each side 164 164 const tabWidth = ((viewport.value[0] + 20) / parentWindow) * 100 165 165 return tabWidth 166 166 }
+1 -1
packages/vitest/src/api/setup.ts
··· 142 142 } 143 143 catch {} 144 144 145 - // TODO: store this in HTML reporter separetly 145 + // TODO: store this in HTML reporter separately 146 146 const transformDuration = ctx.state.metadata[projectName]?.duration[moduleNode.url]?.[0] 147 147 if (transformDuration != null) { 148 148 result.transformTime = transformDuration
+1 -1
packages/vitest/src/node/state.ts
··· 256 256 } 257 257 258 258 cancelFiles(files: FileSpecification[], project: TestProject): void { 259 - // if we don't filter existing modules, they will be overriden by `collectFiles` 259 + // if we don't filter existing modules, they will be overridden by `collectFiles` 260 260 const nonRegisteredFiles = files.filter(({ filepath }) => { 261 261 const relativePath = relative(project.config.root, filepath) 262 262 const id = generateFileHash(relativePath, project.name)
+2 -2
packages/vitest/src/node/watch-filter.ts
··· 230 230 } 231 231 232 232 private restoreCursor() { 233 - const cursortPos 233 + const cursorPos 234 234 = this.keywordOffset() + (this.currentKeyword?.length || 0) 235 - this.write(`${ESC}${cursortPos}G`) 235 + this.write(`${ESC}${cursorPos}G`) 236 236 } 237 237 238 238 private write(data: string) {
+1 -1
packages/vitest/src/utils/traces.ts
··· 218 218 throw error 219 219 } 220 220 finally { 221 - // end sync callbcak 221 + // end sync callback 222 222 if (!(result instanceof Promise)) { 223 223 span.end() 224 224 }
+1 -1
test/browser/fixtures/expect-dom/toHaveTextContent.test.ts
··· 69 69 expect(container.querySelector('#parent')).toHaveTextContent('Step 1 of 4') 70 70 }) 71 71 72 - test('can handle multiple levels with content spread across decendants', () => { 72 + test('can handle multiple levels with content spread across descendants', () => { 73 73 const {container} = render(` 74 74 <span id="parent"> 75 75 <span>Step</span>
+1 -1
test/browser/fixtures/failing/failing.snaphot.test.ts
··· 2 2 3 3 test('file snapshot', async () => { 4 4 await expect('inaccessible snapshot content') 5 - .toMatchFileSnapshot('/inaccesible/path') 5 + .toMatchFileSnapshot('/inaccessible/path') 6 6 })
+1 -1
test/cli/fixtures/public-api/custom.spec.ts
··· 12 12 }) 13 13 14 14 test('custom', ({ task }) => { 15 - task.meta.custom = 'some-custom-hanlder' 15 + task.meta.custom = 'some-custom-handler' 16 16 }) 17 17 18 18 test.each([1, 2])('custom %s', () => {
+2 -2
test/cli/test/config/browser-configs.test.ts
··· 974 974 }) 975 975 976 976 test('browser root', async () => { 977 - process.env.BROWSER_DEFINE_TEST_PROEJCT = 'false' 977 + process.env.BROWSER_DEFINE_TEST_PROJECT = 'false' 978 978 const { testTree, stderr } = await runVitest({ 979 979 root: './fixtures/config/browser-define', 980 980 browser: { ··· 992 992 }) 993 993 994 994 test('browser project', async () => { 995 - process.env.BROWSER_DEFINE_TEST_PROEJCT = 'true' 995 + process.env.BROWSER_DEFINE_TEST_PROJECT = 'true' 996 996 const { testTree, stderr } = await runVitest({ 997 997 root: './fixtures/config/browser-define', 998 998 browser: {
+2 -2
test/core/test/environments/jsdom.spec.ts
··· 124 124 }) 125 125 126 126 // https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData#exceptions 127 - test('cannot pass down form data from a FORM element with a non-sumbit sumbitter', async () => { 127 + test('cannot pass down form data from a FORM element with a non-submit submitter', async () => { 128 128 const form = document.createElement('form') 129 129 document.body.append(form) 130 130 const submitter = document.createElement('button') ··· 136 136 ) 137 137 }) 138 138 139 - test('cannot pass down form data from a FORM element with a sumbitter from a wrong form', async () => { 139 + test('cannot pass down form data from a FORM element with a submitter from a wrong form', async () => { 140 140 const form1 = document.createElement('form') 141 141 const form2 = document.createElement('form') 142 142 document.body.append(form1, form2)
+1 -1
test/core/test/mocking/vi-fn.test-d.ts
··· 68 68 expectTypeOf(Mock).constructorParameters.toEqualTypeOf<[a: string, b?: number]>() 69 69 }) 70 70 71 - test('cann call a function mock with and without new', () => { 71 + test('can call a function mock with and without new', () => { 72 72 const Mock = vi.fn(function fn(this: any) { 73 73 this.test = true 74 74 })
+1 -1
test/coverage-test/fixtures/src/ignore-hints.ts
··· 14 14 } 15 15 16 16 export function fourth() { 17 - return "fourh" 17 + return "fourth" 18 18 } 19 19 /* istanbul ignore stop */ 20 20
+1 -1
packages/browser/src/client/tester/tester.ts
··· 145 145 const runner = await initiateRunner(state, mocker, config) 146 146 getBrowserState().runner = runner 147 147 148 - // webdiverio context depends on the iframe state, so we need to switch the context, 148 + // webdriverio context depends on the iframe state, so we need to switch the context, 149 149 // we delay this in case the user doesn't use any userEvent commands to avoid the overhead 150 150 if (server.provider === 'webdriverio') { 151 151 let switchPromise: Promise<void> | null = null
+2 -2
packages/ui/client/composables/explorer/utils.ts
··· 43 43 return false 44 44 } 45 45 46 - const treshold = config.value.slowTestThreshold 47 - return typeof treshold === 'number' && duration > treshold 46 + const threshold = config.value.slowTestThreshold 47 + return typeof threshold === 'number' && duration > threshold 48 48 } 49 49 50 50 export function getSortedRootTasks(sort: SortUIType, tasks = explorerTree.root.tasks) {
+1 -1
packages/vitest/src/integrations/env/jsdom.ts
··· 133 133 'AbortController', 134 134 'AbortSignal', 135 135 'URLSearchParams', 136 - // URL and Request is overriden with a compat one 136 + // URL and Request is overridden with a compat one 137 137 // 'URL', 138 138 // 'Request', 139 139 ] as const
+2 -2
packages/vitest/src/integrations/env/utils.ts
··· 52 52 53 53 const originals = new Map<string | symbol, any>() 54 54 55 - const overridenKeys = new Set([...KEYS, ...options.additionalKeys || []]) 55 + const overriddenKeys = new Set([...KEYS, ...options.additionalKeys || []]) 56 56 57 57 const overrideObject = new Map<string | symbol, any>() 58 58 for (const key of keys) { ··· 62 62 && !isClassLikeName(key) 63 63 && win[key].bind(win) 64 64 65 - if (overridenKeys.has(key) && key in global) { 65 + if (overriddenKeys.has(key) && key in global) { 66 66 originals.set(key, global[key]) 67 67 } 68 68
+1 -1
packages/vitest/src/node/browser/sessions.ts
··· 16 16 } 17 17 18 18 createSession(sessionId: string, project: TestProject, pool: { reject: (error: Error) => void }): Promise<void> { 19 - // this promise only waits for the WS connection with the orhcestrator to be established 19 + // this promise only waits for the WS connection with the orchestrator to be established 20 20 const defer = createDefer<void>() 21 21 22 22 const timeout = setTimeout(() => {
+1 -1
packages/vitest/src/node/cache/fsModuleCache.ts
··· 212 212 consumer: config.consumer, 213 213 resolve: config.resolve, 214 214 // plugins can have different options, so this is not the best key, 215 - // but we canot access the options because there is no standard API for it 215 + // but we cannot access the options because there is no standard API for it 216 216 plugins: config.plugins 217 217 .filter(p => p.api?.vitest?.experimental?.ignoreFsModuleCache !== true) 218 218 .map(p => p.name),
+1 -1
packages/vitest/src/node/config/resolveConfig.ts
··· 494 494 resolvePath(file, resolved.root), 495 495 ) 496 496 497 - // Add hard-coded default coverage exclusions. These cannot be overidden by user config. 497 + // Add hard-coded default coverage exclusions. These cannot be overridden by user config. 498 498 // Override original exclude array for cases where user re-uses same object in test.exclude. 499 499 resolved.coverage.exclude = [ 500 500 ...resolved.coverage.exclude,
+2 -2
packages/vitest/src/node/sequencers/BaseSequencer.ts
··· 12 12 this.ctx = ctx 13 13 } 14 14 15 - // async so it can be extended by other sequelizers 15 + // async so it can be extended by other sequencers 16 16 public async shard(files: TestSpecification[]): Promise<TestSpecification[]> { 17 17 const { config } = this.ctx 18 18 const { index, count } = config.shard! ··· 31 31 .map(({ spec }) => spec) 32 32 } 33 33 34 - // async so it can be extended by other sequelizers 34 + // async so it can be extended by other sequencers 35 35 public async sort(files: TestSpecification[]): Promise<TestSpecification[]> { 36 36 const cache = this.ctx.cache 37 37 return [...files].sort((a, b) => {
+1 -1
packages/vitest/src/runtime/moduleRunner/moduleEvaluator.ts
··· 86 86 private convertIdToImportUrl(id: string) { 87 87 // TODO: vitest returns paths for external modules, but Vite returns file:// 88 88 // REMOVE WHEN VITE 6 SUPPORT IS OVER 89 - // unfortunetly, there is a bug in Vite where ID is resolved incorrectly, so we can't return files until the fix is merged 89 + // unfortunately, there is a bug in Vite where ID is resolved incorrectly, so we can't return files until the fix is merged 90 90 // https://github.com/vitejs/vite/pull/20449 91 91 if (!isWindows || isBuiltin(id) || /^(?:node:|data:|http:|https:|file:)/.test(id)) { 92 92 return id
+1 -1
packages/vitest/src/runtime/moduleRunner/moduleRunner.ts
··· 102 102 * Vite checks that the module has exports emulating the Node.js behaviour, 103 103 * but Vitest is more relaxed. 104 104 * 105 - * We should keep the Vite behavour when there is a `strict` flag. 105 + * We should keep the Vite behavior when there is a `strict` flag. 106 106 * @internal 107 107 */ 108 108 processImport(exports: Record<string, any>): Record<string, any> {
+1 -1
test/cli/fixtures/config/browser-define/vitest.config.ts
··· 18 18 }, 19 19 }) 20 20 21 - if (process.env.BROWSER_DEFINE_TEST_PROEJCT === "true") { 21 + if (process.env.BROWSER_DEFINE_TEST_PROJECT === "true") { 22 22 config = defineConfig({ 23 23 test: { 24 24 projects: [config],
+1 -1
test/cli/fixtures/no-module-runner/test/manual-mock.test.ts
··· 77 77 }) 78 78 79 79 test('importMock works', async () => { 80 - // wasnt't mocked by vi.mock, but importMock did 80 + // wasn't mocked by vi.mock, but importMock did 81 81 const mockedUnmocked = await vi.importMock<typeof import('../src/no-mock.ts')>('../src/no-mock.ts') 82 82 expect(vi.isMockFunction(mockedUnmocked.notMocked)).toBe(true) 83 83 expect(mockedUnmocked.notMocked()).toBeUndefined()