jquery/build/tasks/promises_aplus_tests.js
Michał Gołębiowski-Owczarek f47c6a8337
Build: Update ESLint-related packages, fix linting errors
The main change is the new rule in `eslint-config-jquery`:
`template-curly-spacing`.

Closes gh-5347
Ref jquery/eslint-config-jquery#21
Ref gh-5348
2023-11-02 00:48:50 +01:00

33 lines
688 B
JavaScript

"use strict";
const { spawn } = require( "child_process" );
const verifyNodeVersion = require( "./lib/verifyNodeVersion" );
const path = require( "path" );
const os = require( "os" );
if ( !verifyNodeVersion() ) {
return;
}
const command = path.resolve(
__dirname,
`../../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 ),
{ stdio: "inherit" }
);
} );
}
runTests();