Skip to content

Commit 4b6b59c

Browse files
chore: update PR as per feedback
1 parent 6b326f7 commit 4b6b59c

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

script/spec-runner.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const path = require('path')
88
const unknownArgs = []
99

1010
const args = require('minimist')(process.argv, {
11-
string: ['only'],
11+
string: ['runners'],
1212
unknown: arg => unknownArgs.push(arg)
1313
})
1414

@@ -19,10 +19,10 @@ const NPM_CMD = process.platform === 'win32' ? 'npm.cmd' : 'npm'
1919

2020
const specHashPath = path.resolve(__dirname, '../spec/.hash')
2121

22-
let only = null
23-
if (args.only) {
24-
only = args.only.split(',')
25-
console.log('Only running:', only)
22+
let runnersToRun = null
23+
if (args.runners) {
24+
runnersToRun = args.only.split(',')
25+
console.log('Only running:', runnersToRun)
2626
} else {
2727
console.log('Will trigger all spec runners')
2828
}
@@ -75,7 +75,7 @@ async function runElectronTests () {
7575

7676
const mochaFile = process.env.MOCHA_FILE
7777
for (const runner of runners) {
78-
if (only && !only.includes(runner[1])) {
78+
if (runnersToRun && !runnersToRun.includes(runner[1])) {
7979
console.info('\nSkipping:', runner[0])
8080
continue
8181
}

spec-main/api-app-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('app module', () => {
119119

120120
describe('app.isPackaged', () => {
121121
it('should be false durings tests', () => {
122-
expect(app.isPackaged).equal(false)
122+
expect(app.isPackaged).to.equal(false)
123123
})
124124
})
125125

@@ -180,7 +180,7 @@ describe('app module', () => {
180180

181181
// Singleton will send us greeting data to let us know it's running.
182182
// After that, ask it to exit gracefully and confirm that it does.
183-
appProcess.stdout.on('data', data => appProcess && appProcess.kill())
183+
appProcess.stdout.on('data', data => appProcess!.kill())
184184
const [code, signal] = await emittedOnce(appProcess, 'close')
185185

186186
const message = `code:\n${code}\nsignal:\n${signal}`
@@ -1226,9 +1226,9 @@ describe('app module', () => {
12261226
expect(app.whenReady()).to.be.a('promise')
12271227
})
12281228

1229-
it('becomes fulfilled if the app is already ready', () => {
1229+
it('becomes fulfilled if the app is already ready', async () => {
12301230
expect(app.isReady()).to.equal(true)
1231-
expect(app.whenReady()).to.be.eventually.fulfilled.equal(undefined)
1231+
await expect(app.whenReady()).to.be.eventually.fulfilled.equal(undefined)
12321232
})
12331233
})
12341234

0 commit comments

Comments
 (0)