| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,5 +15,5 @@ assert.throws( | |||
| 15 | 15 | () => require('../fixtures/es-modules/loose.js'), | |
| 16 | 16 | { | |
| 17 | 17 | name: 'SyntaxError', | |
| 18 | - message: /Unexpected token 'export'/ | ||
| 18 | + message: /Unexpected token 'export'/, | ||
| 19 | 19 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,5 +28,5 @@ vm.runInThisContext(code, { | |||
| 28 | 28 | await m.link(() => {}); | |
| 29 | 29 | await m.evaluate(); | |
| 30 | 30 | return m; | |
| 31 | - } | ||
| 31 | + }, | ||
| 32 | 32 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,21 +27,21 @@ await assert.rejects(async () => { | |||
| 27 | 27 | await import(`${fixtureBase}/single-quote.mjs`); | |
| 28 | 28 | }, { | |
| 29 | 29 | name: 'SyntaxError', | |
| 30 | - message: expectedRelative | ||
| 30 | + message: expectedRelative, | ||
| 31 | 31 | }, 'should support relative specifiers with single quotes'); | |
| 32 | 32 | ||
| 33 | 33 | await assert.rejects(async () => { | |
| 34 | 34 | await import(`${fixtureBase}/double-quote.mjs`); | |
| 35 | 35 | }, { | |
| 36 | 36 | name: 'SyntaxError', | |
| 37 | - message: expectedRelative | ||
| 37 | + message: expectedRelative, | ||
| 38 | 38 | }, 'should support relative specifiers with double quotes'); | |
| 39 | 39 | ||
| 40 | 40 | await assert.rejects(async () => { | |
| 41 | 41 | await import(`${fixtureBase}/renamed-import.mjs`); | |
| 42 | 42 | }, { | |
| 43 | 43 | name: 'SyntaxError', | |
| 44 | - message: expectedRenamed | ||
| 44 | + message: expectedRenamed, | ||
| 45 | 45 | }, 'should correctly format named imports with renames'); | |
| 46 | 46 | ||
| 47 | 47 | await assert.rejects(async () => { | |
@@ -55,21 +55,21 @@ await assert.rejects(async () => { | |||
| 55 | 55 | await import(`${fixtureBase}/json-hack.mjs`); | |
| 56 | 56 | }, { | |
| 57 | 57 | name: 'SyntaxError', | |
| 58 | - message: expectedPackageHack | ||
| 58 | + message: expectedPackageHack, | ||
| 59 | 59 | }, 'should respect recursive package.json for module type'); | |
| 60 | 60 | ||
| 61 | 61 | await assert.rejects(async () => { | |
| 62 | 62 | await import(`${fixtureBase}/bare-import-single.mjs`); | |
| 63 | 63 | }, { | |
| 64 | 64 | name: 'SyntaxError', | |
| 65 | - message: expectedBare | ||
| 65 | + message: expectedBare, | ||
| 66 | 66 | }, 'should support bare specifiers with single quotes'); | |
| 67 | 67 | ||
| 68 | 68 | await assert.rejects(async () => { | |
| 69 | 69 | await import(`${fixtureBase}/bare-import-double.mjs`); | |
| 70 | 70 | }, { | |
| 71 | 71 | name: 'SyntaxError', | |
| 72 | - message: expectedBare | ||
| 72 | + message: expectedBare, | ||
| 73 | 73 | }, 'should support bare specifiers with double quotes'); | |
| 74 | 74 | ||
| 75 | 75 | await assert.rejects(async () => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,7 +76,7 @@ function createBase64URL(mime, body) { | |||
| 76 | 76 | import('data:application/json;foo="test,",0', | |
| 77 | 77 | { with: { type: 'json' } }), { | |
| 78 | 78 | name: 'SyntaxError', | |
| 79 | - message: /Unterminated string in JSON at position 3/ | ||
| 79 | + message: /Unterminated string in JSON at position 3/, | ||
| 80 | 80 | }); | |
| 81 | 81 | } | |
| 82 | 82 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,5 +10,5 @@ assert.throws(() => { | |||
| 10 | 10 | }, { | |
| 11 | 11 | code: 'ERR_INVALID_ARG_VALUE', | |
| 12 | 12 | name: 'TypeError', | |
| 13 | - message: `The argument 'address' is invalid. Received '${invalidAddress}'` | ||
| 13 | + message: `The argument 'address' is invalid. Received '${invalidAddress}'`, | ||
| 14 | 14 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ function expectOkNamespace(result) { | |||
| 19 | 19 | .then(common.mustCall((ns) => { | |
| 20 | 20 | const expected = { default: true }; | |
| 21 | 21 | Object.defineProperty(expected, Symbol.toStringTag, { | |
| 22 | - value: 'Module' | ||
| 22 | + value: 'Module', | ||
| 23 | 23 | }); | |
| 24 | 24 | Object.setPrototypeOf(expected, Object.getPrototypeOf(ns)); | |
| 25 | 25 | assert.deepStrictEqual(ns, expected); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ for (const descriptor of Object.values(descriptors)) { | |||
| 12 | 12 | assert.deepStrictEqual(descriptor, { | |
| 13 | 13 | enumerable: true, | |
| 14 | 14 | writable: true, | |
| 15 | - configurable: true | ||
| 15 | + configurable: true, | ||
| 16 | 16 | }); | |
| 17 | 17 | } | |
| 18 | 18 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,6 @@ import assert from 'assert'; | |||
| 5 | 5 | import('../fixtures/es-modules/test-esm-ok.mjs') | |
| 6 | 6 | .then(assert.fail, expectsError({ | |
| 7 | 7 | code: 'ERR_UNKNOWN_MODULE_FORMAT', | |
| 8 | - message: /Unknown module format: esm/ | ||
| 8 | + message: /Unknown module format: esm/, | ||
| 9 | 9 | })) | |
| 10 | 10 | .then(mustCall()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,21 +3,21 @@ import assert from 'node:assert/strict'; | |||
| 3 | 3 | import { mock } from '../fixtures/es-module-loaders/mock.mjs'; | |
| 4 | 4 | ||
| 5 | 5 | mock('node:events', { | |
| 6 | - EventEmitter: 'This is mocked!' | ||
| 6 | + EventEmitter: 'This is mocked!', | ||
| 7 | 7 | }); | |
| 8 | 8 | ||
| 9 | 9 | // This resolves to node:events | |
| 10 | 10 | // It is intercepted by mock-loader and doesn't return the normal value | |
| 11 | 11 | assert.deepStrictEqual(await import('events'), Object.defineProperty({ | |
| 12 | 12 | __proto__: null, | |
| 13 | - EventEmitter: 'This is mocked!' | ||
| 13 | + EventEmitter: 'This is mocked!', | ||
| 14 | 14 | }, Symbol.toStringTag, { | |
| 15 | 15 | enumerable: false, | |
| 16 | - value: 'Module' | ||
| 16 | + value: 'Module', | ||
| 17 | 17 | })); | |
| 18 | 18 | ||
| 19 | 19 | const mutator = mock('node:events', { | |
| 20 | - EventEmitter: 'This is mocked v2!' | ||
| 20 | + EventEmitter: 'This is mocked v2!', | ||
| 21 | 21 | }); | |
| 22 | 22 | ||
| 23 | 23 | // It is intercepted by mock-loader and doesn't return the normal value. | |
@@ -26,17 +26,17 @@ const mutator = mock('node:events', { | |||
| 26 | 26 | const mockedV2 = await import('node:events'); | |
| 27 | 27 | assert.deepStrictEqual(mockedV2, Object.defineProperty({ | |
| 28 | 28 | __proto__: null, | |
| 29 | - EventEmitter: 'This is mocked v2!' | ||
| 29 | + EventEmitter: 'This is mocked v2!', | ||
| 30 | 30 | }, Symbol.toStringTag, { | |
| 31 | 31 | enumerable: false, | |
| 32 | - value: 'Module' | ||
| 32 | + value: 'Module', | ||
| 33 | 33 | })); | |
| 34 | 34 | ||
| 35 | 35 | mutator.EventEmitter = 'This is mocked v3!'; | |
| 36 | 36 | assert.deepStrictEqual(mockedV2, Object.defineProperty({ | |
| 37 | 37 | __proto__: null, | |
| 38 | - EventEmitter: 'This is mocked v3!' | ||
| 38 | + EventEmitter: 'This is mocked v3!', | ||
| 39 | 39 | }, Symbol.toStringTag, { | |
| 40 | 40 | enumerable: false, | |
| 41 | - value: 'Module' | ||
| 41 | + value: 'Module', | ||
| 42 | 42 | })); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ const jsonModuleJob = new ModuleJob(loader, jsonModuleDataUrl, | |||
| 55 | 55 | const errorObj = { | |
| 56 | 56 | code: 'ERR_INVALID_ARG_TYPE', | |
| 57 | 57 | name: 'TypeError', | |
| 58 | - message: /^The "url" argument must be of type string/ | ||
| 58 | + message: /^The "url" argument must be of type string/, | ||
| 59 | 59 | }; | |
| 60 | 60 | ||
| 61 | 61 | [{}, [], true, 1].forEach((value) => { | |
@@ -73,7 +73,7 @@ const jsonModuleJob = new ModuleJob(loader, jsonModuleDataUrl, | |||
| 73 | 73 | const errorObj = { | |
| 74 | 74 | code: 'ERR_INVALID_ARG_TYPE', | |
| 75 | 75 | name: 'TypeError', | |
| 76 | - message: /^The "type" argument must be of type string/ | ||
| 76 | + message: /^The "type" argument must be of type string/, | ||
| 77 | 77 | }; | |
| 78 | 78 | ||
| 79 | 79 | [{}, [], true, 1].forEach((value) => { | |
@@ -91,7 +91,7 @@ const jsonModuleJob = new ModuleJob(loader, jsonModuleDataUrl, | |||
| 91 | 91 | assert.throws(() => moduleMap.set('', undefined, value), { | |
| 92 | 92 | code: 'ERR_INVALID_ARG_TYPE', | |
| 93 | 93 | name: 'TypeError', | |
| 94 | - message: /^The "job" argument must be an instance of ModuleJob/ | ||
| 94 | + message: /^The "job" argument must be an instance of ModuleJob/, | ||
| 95 | 95 | }); | |
| 96 | 96 | }); | |
| 97 | 97 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments