diff --git a/script/spec-runner.js b/script/spec-runner.js index a1b4fe185ef2..139a3d55572f 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -8,7 +8,7 @@ const path = require('path') const unknownArgs = [] const args = require('minimist')(process.argv, { - string: ['only'], + string: ['runners'], unknown: arg => unknownArgs.push(arg) }) @@ -19,10 +19,10 @@ const NPM_CMD = process.platform === 'win32' ? 'npm.cmd' : 'npm' const specHashPath = path.resolve(__dirname, '../spec/.hash') -let only = null -if (args.only) { - only = args.only.split(',') - console.log('Only running:', only) +let runnersToRun = null +if (args.runners) { + runnersToRun = args.only.split(',') + console.log('Only running:', runnersToRun) } else { console.log('Will trigger all spec runners') } @@ -75,7 +75,7 @@ async function runElectronTests () { const mochaFile = process.env.MOCHA_FILE for (const runner of runners) { - if (only && !only.includes(runner[1])) { + if (runnersToRun && !runnersToRun.includes(runner[1])) { console.info('\nSkipping:', runner[0]) continue } diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index 180464cdea3f..7cbb24f1d8db 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -119,7 +119,7 @@ describe('app module', () => { describe('app.isPackaged', () => { it('should be false durings tests', () => { - expect(app.isPackaged).equal(false) + expect(app.isPackaged).to.equal(false) }) }) @@ -180,7 +180,7 @@ describe('app module', () => { // Singleton will send us greeting data to let us know it's running. // After that, ask it to exit gracefully and confirm that it does. - appProcess.stdout.on('data', data => appProcess && appProcess.kill()) + appProcess.stdout.on('data', data => appProcess!.kill()) const [code, signal] = await emittedOnce(appProcess, 'close') const message = `code:\n${code}\nsignal:\n${signal}` @@ -1226,9 +1226,9 @@ describe('app module', () => { expect(app.whenReady()).to.be.a('promise') }) - it('becomes fulfilled if the app is already ready', () => { + it('becomes fulfilled if the app is already ready', async () => { expect(app.isReady()).to.equal(true) - expect(app.whenReady()).to.be.eventually.fulfilled.equal(undefined) + await expect(app.whenReady()).to.be.eventually.fulfilled.equal(undefined) }) })