diff --git a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs index df8f8a6fe9c780..db20bc047feec1 100644 --- a/test/es-module/test-esm-extensionless-esm-and-wasm.mjs +++ b/test/es-module/test-esm-extensionless-esm-and-wasm.mjs @@ -24,7 +24,8 @@ describe('extensionless ES modules within a "type": "module" package scope', { c it('should be importable from a module scope under node_modules', async () => { const { default: defaultExport } = - await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-esm')); + await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-esm')); strictEqual(defaultExport, 'module'); }); }); @@ -48,7 +49,8 @@ describe('extensionless Wasm modules within a "type": "module" package scope', { }); it('should be importable from a module scope under node_modules', async () => { - const { add } = await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-wasm')); + const { add } = await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-wasm')); strictEqual(add(1, 2), 3); }); }); diff --git a/test/es-module/test-esm-type-flag-package-scopes.mjs b/test/es-module/test-esm-type-flag-package-scopes.mjs index bb1d52ae57ef1a..bf9d7d7ca4944c 100644 --- a/test/es-module/test-esm-type-flag-package-scopes.mjs +++ b/test/es-module/test-esm-type-flag-package-scopes.mjs @@ -24,11 +24,13 @@ describe('the type flag should change the interpretation of certain files within strictEqual(defaultExport, 'module'); }); - it('should import an extensionless JavaScript file within a "type": "module" scope under node_modules', async () => { - const { default: defaultExport } = - await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-esm')); - strictEqual(defaultExport, 'module'); - }); + it('should import an extensionless JavaScript file within a "type": "module" scope under node_modules', + async () => { + const { default: defaultExport } = + await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-esm')); + strictEqual(defaultExport, 'module'); + }); it('should run as Wasm an extensionless Wasm file within a "type": "module" scope', async () => { const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ @@ -49,10 +51,12 @@ describe('the type flag should change the interpretation of certain files within strictEqual(add(1, 2), 3); }); - it('should import an extensionless Wasm file within a "type": "module" scope under node_modules', async () => { - const { add } = await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-wasm')); - strictEqual(add(1, 2), 3); - }); + it('should import an extensionless Wasm file within a "type": "module" scope under node_modules', + async () => { + const { add } = await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-type-module/noext-wasm')); + strictEqual(add(1, 2), 3); + }); }); describe(`the type flag should change the interpretation of certain files within a package scope that lacks a @@ -135,7 +139,8 @@ describe(`the type flag should NOT change the interpretation of certain files wi it(`should import as CommonJS a .js file within a package scope that has no defined "type" and is under node_modules`, async () => { const { default: defaultExport } = - await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-without-type/run.js')); + await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-without-type/run.js')); strictEqual(defaultExport, 42); }); @@ -155,7 +160,8 @@ describe(`the type flag should NOT change the interpretation of certain files wi it(`should import as CommonJS an extensionless JavaScript file within a package scope that has no defined "type" and is under node_modules`, async () => { const { default: defaultExport } = - await import(fixtures.fileURL('es-modules/package-type-module/node_modules/dep-with-package-json-without-type/noext-cjs')); + await import(fixtures.fileURL( + 'es-modules/package-type-module/node_modules/dep-with-package-json-without-type/noext-cjs')); strictEqual(defaultExport, 42); }); });