aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/promises_aplus_tests.js
blob: 6f49f02309ffeeaa12897d70572c968131aa9ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import path from "node:path";
import os from "node:os";
import { spawn } from "node:child_process";

const command = path.resolve(
	`node_modules/.bin/promises-aplus-tests${ os.platform() === "win32" ? ".cmd" : "" }`
);
const args = [ "--reporter", "dot", "--timeout", "2000" ];
const tests = [
	"test/promises_aplus_adapters/deferred.cjs",
	"test/promises_aplus_adapters/when.cjs"
];

async function runTests() {
	tests.forEach( ( test ) => {
		spawn(
			command,
			[ test ].concat( args ),
			{ shell: true, stdio: "inherit" }
		);
	} );
}

runTests();