| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f6996ee commit bae14b7
47 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,7 @@ const pjson = path.resolve( | |||
| 15 | 15 | ); | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | - describe('CJS ↔︎ ESM interop warnings', { concurrency: true }, () => { | ||
| 18 | + describe('CJS ↔︎ ESM interop warnings', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 19 | 19 | ||
| 20 | 20 | it(async () => { | |
| 21 | 21 | const required = path.resolve( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ const { execPath } = require('node:process'); | |||
| 7 | 7 | const { describe, it } = require('node:test'); | |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | - describe('ESM: importing CJS', { concurrency: true }, () => { | ||
| 10 | + describe('ESM: importing CJS', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 11 | 11 | it('should support valid CJS exports', async () => { | |
| 12 | 12 | const validEntry = fixtures.path('/es-modules/cjs-exports.mjs'); | |
| 13 | 13 | const { code, signal, stdout } = await spawnPromisified(execPath, [validEntry]); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ const mustNotIncludeMessage = { | |||
| 19 | 19 | includeNote: false, | |
| 20 | 20 | }; | |
| 21 | 21 | ||
| 22 | - describe('ESM: Errors for unexpected exports', { concurrency: true }, () => { | ||
| 22 | + describe('ESM: Errors for unexpected exports', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 23 | 23 | for ( | |
| 24 | 24 | const { errorNeedle, filePath, getMessage, includeNote } | |
| 25 | 25 | of [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,8 @@ import { spawn } from 'node:child_process'; | |||
| 4 | 4 | import { describe, it } from 'node:test'; | |
| 5 | 5 | import { strictEqual, match } from 'node:assert'; | |
| 6 | 6 | ||
| 7 | - describe('--experimental-detect-module', { concurrency: true }, () => { | ||
| 8 | - describe('string input', { concurrency: true }, () => { | ||
| 7 | + describe('--experimental-detect-module', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 8 | + describe('string input', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 9 | 9 | it('permits ESM syntax in --eval input without requiring --input-type=module', async () => { | |
| 10 | 10 | const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ | |
| 11 | 11 | '--experimental-detect-module', | |
@@ -72,7 +72,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { | |||
| 72 | 72 | }); | |
| 73 | 73 | }); | |
| 74 | 74 | ||
| 75 | - describe('.js file input in a typeless package', { concurrency: true }, () => { | ||
| 75 | + describe('.js file input in a typeless package', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 76 | 76 | for (const { testName, entryPath } of [ | |
| 77 | 77 | { | |
| 78 | 78 | testName: 'permits CommonJS syntax in a .js entry point', | |
@@ -114,7 +114,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { | |||
| 114 | 114 | } | |
| 115 | 115 | }); | |
| 116 | 116 | ||
| 117 | - describe('extensionless file input in a typeless package', { concurrency: true }, () => { | ||
| 117 | + describe('extensionless file input in a typeless package', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 118 | 118 | for (const { testName, entryPath } of [ | |
| 119 | 119 | { | |
| 120 | 120 | testName: 'permits CommonJS syntax in an extensionless entry point', | |
@@ -179,7 +179,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { | |||
| 179 | 179 | }); | |
| 180 | 180 | }); | |
| 181 | 181 | ||
| 182 | - describe('file input in a "type": "commonjs" package', { concurrency: true }, () => { | ||
| 182 | + describe('file input in a "type": "commonjs" package', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 183 | 183 | for (const { testName, entryPath } of [ | |
| 184 | 184 | { | |
| 185 | 185 | testName: 'disallows ESM syntax in a .js entry point', | |
@@ -208,7 +208,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { | |||
| 208 | 208 | } | |
| 209 | 209 | }); | |
| 210 | 210 | ||
| 211 | - describe('file input in a "type": "module" package', { concurrency: true }, () => { | ||
| 211 | + describe('file input in a "type": "module" package', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 212 | 212 | for (const { testName, entryPath } of [ | |
| 213 | 213 | { | |
| 214 | 214 | testName: 'disallows CommonJS syntax in a .js entry point', | |
@@ -238,7 +238,7 @@ describe('--experimental-detect-module', { concurrency: true }, () => { | |||
| 238 | 238 | }); | |
| 239 | 239 | ||
| 240 | 240 | // https://github.com/nodejs/node/issues/50917 | |
| 241 | - describe('syntax that errors in CommonJS but works in ESM', { concurrency: true }, () => { | ||
| 241 | + describe('syntax that errors in CommonJS but works in ESM', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 242 | 242 | it('permits top-level `await`', async () => { | |
| 243 | 243 | const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ | |
| 244 | 244 | '--experimental-detect-module', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ import { execPath } from 'node:process'; | |||
| 5 | 5 | import { describe, it } from 'node:test'; | |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | - describe('ESM: warn for obsolete hooks provided', { concurrency: true }, () => { | ||
| 8 | + describe('ESM: warn for obsolete hooks provided', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 9 | 9 | it('should not print warnings when no experimental features are enabled or used', async () => { | |
| 10 | 10 | const { code, signal, stderr } = await spawnPromisified(execPath, [ | |
| 11 | 11 | '--input-type=module', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ const importStatementMultiline = `import { | |||
| 12 | 12 | } from './module-named-exports.mjs'; | |
| 13 | 13 | `; | |
| 14 | 14 | ||
| 15 | - describe('ESM: nonexistent exports', { concurrency: true }, () => { | ||
| 15 | + describe('ESM: nonexistent exports', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 16 | 16 | for ( | |
| 17 | 17 | const { name, input } | |
| 18 | 18 | of [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ import * as path from 'node:path'; | |||
| 7 | 7 | import { execPath } from 'node:process'; | |
| 8 | 8 | import { describe, it, before } from 'node:test'; | |
| 9 | 9 | ||
| 10 | - describe('ESM in main field', { concurrency: true }, () => { | ||
| 10 | + describe('ESM in main field', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 11 | 11 | before(() => tmpdir.refresh()); | |
| 12 | 12 | ||
| 13 | 13 | it('should handle fully-specified relative path without any warning', async () => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,9 @@ import * as fixtures from '../common/fixtures.mjs'; | |||
| 4 | 4 | import { describe, it } from 'node:test'; | |
| 5 | 5 | import { match, ok, strictEqual } from 'node:assert'; | |
| 6 | 6 | ||
| 7 | - describe('extensionless ES modules within a "type": "module" package scope', { concurrency: true }, () => { | ||
| 7 | + describe('extensionless ES modules within a "type": "module" package scope', { | ||
| 8 | + concurrency: !process.env.TEST_PARALLEL, | ||
| 9 | + }, () => { | ||
| 8 | 10 | it('should run as the entry point', async () => { | |
| 9 | 11 | const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ | |
| 10 | 12 | fixtures.path('es-modules/package-type-module/noext-esm'), | |
@@ -29,7 +31,9 @@ describe('extensionless ES modules within a "type": "module" package scope', { c | |||
| 29 | 31 | strictEqual(defaultExport, 'module'); | |
| 30 | 32 | }); | |
| 31 | 33 | }); | |
| 32 | - describe('extensionless Wasm modules within a "type": "module" package scope', { concurrency: true }, () => { | ||
| 34 | + describe('extensionless Wasm modules within a "type": "module" package scope', { | ||
| 35 | + concurrency: !process.env.TEST_PARALLEL, | ||
| 36 | + }, () => { | ||
| 33 | 37 | it('should run as the entry point', async () => { | |
| 34 | 38 | const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ | |
| 35 | 39 | '--experimental-wasm-modules', | |
@@ -55,7 +59,7 @@ describe('extensionless Wasm modules within a "type": "module" package scope', { | |||
| 55 | 59 | }); | |
| 56 | 60 | }); | |
| 57 | 61 | ||
| 58 | - describe('extensionless ES modules within no package scope', { concurrency: true }, () => { | ||
| 62 | + describe('extensionless ES modules within no package scope', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 59 | 63 | // This succeeds with `--experimental-default-type=module` | |
| 60 | 64 | it('should error as the entry point', async () => { | |
| 61 | 65 | const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ | |
@@ -79,7 +83,7 @@ describe('extensionless ES modules within no package scope', { concurrency: true | |||
| 79 | 83 | }); | |
| 80 | 84 | }); | |
| 81 | 85 | ||
| 82 | - describe('extensionless Wasm within no package scope', { concurrency: true }, () => { | ||
| 86 | + describe('extensionless Wasm within no package scope', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 83 | 87 | // This succeeds with `--experimental-default-type=module` | |
| 84 | 88 | it('should error as the entry point', async () => { | |
| 85 | 89 | const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ const mjsEntry = fixtures.path('es-modules', 'mjs-file.mjs'); | |||
| 10 | 10 | const mjsImport = fixtures.fileURL('es-modules', 'mjs-file.mjs'); | |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | - describe('import modules using --import', { concurrency: true }, () => { | ||
| 13 | + describe('import modules using --import', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 14 | 14 | it('should import when using --eval', async () => { | |
| 15 | 15 | const { code, signal, stderr, stdout } = await spawnPromisified( | |
| 16 | 16 | execPath, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ import { execPath } from 'node:process'; | |||
| 5 | 5 | import { describe, it } from 'node:test'; | |
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | - describe('ESM: named JSON exports', { concurrency: true }, () => { | ||
| 8 | + describe('ESM: named JSON exports', { concurrency: !process.env.TEST_PARALLEL }, () => { | ||
| 9 | 9 | it('should throw, citing named import', async () => { | |
| 10 | 10 | const { code, stderr } = await spawnPromisified(execPath, [ | |
| 11 | 11 | fixtures.path('es-modules', 'import-json-named-export.mjs'), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments