зеркало из https://github.com/electron/electron.git
chore: update PR as per feedback
This commit is contained in:
Родитель
6b326f7924
Коммит
4b6b59cc82
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче