Skip to content

Commit

Permalink
chore: cleanup typos, remove any in VM executor (#3994)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Aug 22, 2023
1 parent dff60e8 commit 18ae07a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/vitest/src/runtime/external-executor.ts
Expand Up @@ -112,7 +112,7 @@ export class ExternalModulesExecutor {

private wrapCoreSynteticModule(identifier: string, exports: Record<string, unknown>) {
const moduleKeys = Object.keys(exports)
const m: any = new SyntheticModule(
const m = new SyntheticModule(
[...moduleKeys, 'default'],
() => {
for (const key of moduleKeys)
Expand All @@ -130,7 +130,7 @@ export class ExternalModulesExecutor {
private wrapCommonJsSynteticModule(identifier: string, exports: Record<string, unknown>) {
// TODO: technically module should be parsed to find static exports, implement for strict mode in #2854
const { keys, moduleExports, defaultExport } = interopCommonJsModule(this.options.interopDefault, exports)
const m: any = new SyntheticModule(
const m = new SyntheticModule(
[...keys, 'default'],
() => {
for (const key of keys)
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/runtime/vm/vite-executor.ts
Expand Up @@ -58,7 +58,7 @@ export class ViteExecutor {
return cached
const result = await this.options.transform(fileUrl, 'web')
if (!result.code)
throw new Error(`[vitest] Failed to transform ${fileUrl}. Does the file exists?`)
throw new Error(`[vitest] Failed to transform ${fileUrl}. Does the file exist?`)
return this.esm.createEsModule(fileUrl, result.code)
}

Expand Down

0 comments on commit 18ae07a

Please sign in to comment.