Use process.argv in tests

This commit is contained in:
Christopher Jones 2019-02-14 11:42:57 +11:00
parent 43a4eccd16
commit 0dae8293a2
1 changed files with 3 additions and 3 deletions

View File

@ -68,16 +68,16 @@ describe('182. deferLibInit.js', () => {
}); });
async function positiveCase() { async function positiveCase() {
const { stdout } = await execFile('node_modules/.bin/mocha', ['test/deferLibInit1.js']); const { stdout } = await execFile(process.argv[1], ['test/deferLibInit1.js']);
should.exist(stdout); should.exist(stdout);
} }
async function negativeCase() { async function negativeCase() {
const { stdout } = await execFile('node_modules/.bin/mocha', ['test/deferLibInit2.js']); const { stdout } = await execFile(process.argv[1], ['test/deferLibInit2.js']);
should.exist(stdout); should.exist(stdout);
} }
async function callMethodCase() { async function callMethodCase() {
const { stdout } = await execFile('node_modules/.bin/mocha', ['test/deferLibInit3.js']); const { stdout } = await execFile(process.argv[1], ['test/deferLibInit3.js']);
should.exist(stdout); should.exist(stdout);
} }