Skip to content

Commit

Permalink
Merge branch 'main' into fix/junit-reporter-file-error
Browse files Browse the repository at this point in the history
  • Loading branch information
3c1u committed Aug 23, 2023
2 parents 5c2af14 + 18ae07a commit 169203b
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 169203b

Please sign in to comment.