ability to inject particular testfile to yarn test
This commit is contained in:
+13
-5
@@ -18,8 +18,16 @@ const args = [
|
|||||||
'./lib/**/*test.js'
|
'./lib/**/*test.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
cp.spawnSync(path.resolve(__dirname, '../node_modules/.bin/mocha'), args, {
|
// ability to inject particular test files via
|
||||||
cwd: path.resolve(__dirname, '..'),
|
// yarn test [testFileA testFileB ...]
|
||||||
env,
|
const testFilesFromArgs = process.argv.slice(2);
|
||||||
stdio: 'inherit'
|
|
||||||
});
|
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