mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
ability to inject particular testfile to yarn test
This commit is contained in:
+13
-5
@@ -18,8 +18,16 @@ const args = [
|
||||
'./lib/**/*test.js'
|
||||
];
|
||||
|
||||
cp.spawnSync(path.resolve(__dirname, '../node_modules/.bin/mocha'), args, {
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
env,
|
||||
stdio: 'inherit'
|
||||
});
|
||||
// ability to inject particular test files via
|
||||
// yarn test [testFileA testFileB ...]
|
||||
const testFilesFromArgs = process.argv.slice(2);
|
||||
|
||||
cp.spawnSync(
|
||||
path.resolve(__dirname, '../node_modules/.bin/mocha'),
|
||||
(testFilesFromArgs.length) ? testFilesFromArgs : args,
|
||||
{
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
env,
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user