fix: spec runner not parsing correctly

This commit is contained in:
Samuel Attard 2019-03-15 10:57:12 -07:00
parent 4b6b59cc82
commit 984e77e470
No known key found for this signature in database
GPG key ID: 191FEF027779CC6C
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ const specHashPath = path.resolve(__dirname, '../spec/.hash')
let runnersToRun = null let runnersToRun = null
if (args.runners) { if (args.runners) {
runnersToRun = args.only.split(',') runnersToRun = args.runners.split(',')
console.log('Only running:', runnersToRun) console.log('Only running:', runnersToRun)
} else { } else {
console.log('Will trigger all spec runners') console.log('Will trigger all spec runners')

View file

@ -226,7 +226,7 @@ describe('app module', () => {
const [code1] = await firstExited const [code1] = await firstExited
expect(code1).to.equal(0) expect(code1).to.equal(0)
const data2 = (await data2Promise)[0].toString('ascii') const data2 = (await data2Promise)[0].toString('ascii')
const secondInstanceArgsReceived = JSON.parse(data2.toString('ascii')) const secondInstanceArgsReceived: string[] = JSON.parse(data2.toString('ascii'))
const expected = process.platform === 'win32' const expected = process.platform === 'win32'
? [process.execPath, '--some-switch', '--allow-file-access-from-files', secondInstanceArgsReceived.find(x => x.includes('original-process-start-time')), appPath, 'some-arg'] ? [process.execPath, '--some-switch', '--allow-file-access-from-files', secondInstanceArgsReceived.find(x => x.includes('original-process-start-time')), appPath, 'some-arg']
: secondInstanceArgs : secondInstanceArgs