Skip to content

Commit 76f5f2e

Browse files
committed
All & partial type definitions test commands
1 parent 6a1ad75 commit 76f5f2e

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"test-compat-tools": "npm run zxi tests/compat-tools/index.mjs",
5757
"test-templates": "npm run zxi tests/templates/templates.mjs",
5858
"test-type-definitions": "npm run zxi time cd tests/type-definitions/runner.mjs",
59+
"test-type-definitions-all": "ALL_TYPE_DEFINITIONS_TESTS=1 npm run zxi time cd tests/type-definitions/runner.mjs",
5960
"test262": "npm run zxi time cd tests/test262/runner.mjs",
6061
"refresh": "node scripts/clean-dependencies.mjs && npm install && npm run test-raw",
6162
"downloads": "npm run zxi scripts/downloads-by-versions.mjs",

tests/type-definitions/runner.mjs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { fs } from 'zx';
33

44
const { mkdir, writeJson } = fs;
55
const TMP_DIR = './tmp/';
6+
const ALL_TESTS = process.env.ALL_TYPE_DEFINITIONS_TESTS === '1';
67

78
const targets = [
89
'esnext',
@@ -117,19 +118,17 @@ await $`npx -p typescript@5.9 tsc -p tsconfig.templates.import.json`;
117118
await $`npx -p typescript@5.9 tsc -p tsconfig.entries.json`;
118119
await $`npx -p typescript@5.9 -p @types/node@24 tsc -p tsconfig.templates.require.json`;
119120

120-
// await $`npx -p typescript@5.9 tsc -p pure/tsconfig.json --target es6 --lib es6`;
121-
// await $`npx -p typescript@5.9 tsc -p global/tsconfig.json --target esnext --lib esnext,dom`;
122-
123-
const numCPUs = os.cpus().length;
124-
await prepareEnvironment(envs, types);
125-
await runLimited(taskConfigs, Math.max(numCPUs - 1, 1));
126-
await clearTmpDir();
127-
echo(`Tested: ${ chalk.green(tested) }, Failed: ${ chalk.red(failed) }`);
128-
129-
// await $`tsc -p proposals/global/tsconfig.esnext.json`;
130-
// await $`tsc -p proposals/global/tsconfig.es2023.json`;
131-
// await $`tsc -p proposals/global/tsconfig.es6.json`;
132-
//
133-
// await $`tsc -p proposals/pure/tsconfig.esnext.json`;
134-
// await $`tsc -p proposals/pure/tsconfig.es2023.json`;
135-
// await $`tsc -p proposals/pure/tsconfig.es6.node.json`;
121+
if (!ALL_TESTS) {
122+
await $`npx -p typescript@5.9 tsc -p pure/tsconfig.json --target es6 --lib es6`;
123+
await $`npx -p typescript@5.9 tsc -p pure/tsconfig.json --target es2023 --lib es2023`;
124+
await $`npx -p typescript@5.9 tsc -p pure/tsconfig.json --target esnext --lib esnext`;
125+
await $`npx -p typescript@5.9 tsc -p global/tsconfig.json --target es6 --lib es6,dom`;
126+
await $`npx -p typescript@5.9 tsc -p global/tsconfig.json --target es2023 --lib es2023,dom`;
127+
await $`npx -p typescript@5.9 tsc -p global/tsconfig.json --target esnext --lib esnext,dom`;
128+
} else {
129+
const numCPUs = os.cpus().length;
130+
await prepareEnvironment(envs, types);
131+
await runLimited(taskConfigs, Math.max(numCPUs - 1, 1));
132+
await clearTmpDir();
133+
echo(`Tested: ${ chalk.green(tested) }, Failed: ${ chalk.red(failed) }`);
134+
}

0 commit comments

Comments
 (0)