spec: fix dirtyChai spec failures (#19652)

This commit is contained in:
Shelley Vohr 2019-08-06 10:27:33 -07:00 committed by GitHub
parent c3d0fed9ed
commit da2401ff39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 4 deletions

View file

@ -1,5 +1,6 @@
import * as chai from 'chai'
import * as chaiAsPromised from 'chai-as-promised'
import dirtyChai = require('dirty-chai')
import * as path from 'path'
import * as fs from 'fs'
import * as os from 'os'
@ -9,12 +10,12 @@ import { AddressInfo } from 'net'
import { app, BrowserWindow, BrowserView, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, session, WebContents } from 'electron'
import { emittedOnce } from './events-helpers';
import { closeWindow } from './window-helpers';
import { ifit, ifdescribe } from './spec-helpers'
const { expect } = chai
const ifit = (condition: boolean) => (condition ? it : it.skip)
const ifdescribe = (condition: boolean) => (condition ? describe : describe.skip)
chai.use(chaiAsPromised)
chai.use(dirtyChai)
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures')