2019-03-11 15:06:17 +00:00
|
|
|
"use strict";
|
2015-04-26 17:33:05 +00:00
|
|
|
|
2023-09-20 22:18:42 +00:00
|
|
|
const { spawn } = require( "child_process" );
|
|
|
|
const verifyNodeVersion = require( "./lib/verifyNodeVersion" );
|
|
|
|
const path = require( "path" );
|
|
|
|
const os = require( "os" );
|
2015-04-26 17:33:05 +00:00
|
|
|
|
2023-09-20 22:18:42 +00:00
|
|
|
if ( !verifyNodeVersion() ) {
|
|
|
|
return;
|
|
|
|
}
|
2016-04-15 03:59:30 +00:00
|
|
|
|
2023-09-20 22:18:42 +00:00
|
|
|
const command = path.resolve(
|
|
|
|
__dirname,
|
2023-11-01 23:48:05 +00:00
|
|
|
`../../node_modules/.bin/promises-aplus-tests${ os.platform() === "win32" ? ".cmd" : "" }`
|
2023-09-20 22:18:42 +00:00
|
|
|
);
|
|
|
|
const args = [ "--reporter", "dot", "--timeout", "2000" ];
|
|
|
|
const tests = [
|
|
|
|
"test/promises_aplus_adapters/deferred.js",
|
|
|
|
"test/promises_aplus_adapters/when.js"
|
|
|
|
];
|
2016-04-15 03:59:30 +00:00
|
|
|
|
2023-09-20 22:18:42 +00:00
|
|
|
async function runTests() {
|
|
|
|
tests.forEach( ( test ) => {
|
|
|
|
spawn(
|
|
|
|
command,
|
|
|
|
[ test ].concat( args ),
|
|
|
|
{ stdio: "inherit" }
|
2015-04-26 17:33:05 +00:00
|
|
|
);
|
|
|
|
} );
|
2023-09-20 22:18:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
runTests();
|