зеркало из https://github.com/electron/electron.git
spec: fix dirtyChai spec failures (#19652)
This commit is contained in:
Родитель
c3d0fed9ed
Коммит
da2401ff39
|
@ -10,6 +10,7 @@
|
|||
"@primer/octicons": "^9.1.1",
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/chai-as-promised": "^7.1.0",
|
||||
"@types/dirty-chai": "^2.0.0",
|
||||
"@types/express": "^4.16.1",
|
||||
"@types/fs-extra": "^5.0.5",
|
||||
"@types/mocha": "^5.2.6",
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
import { expect } from 'chai'
|
||||
import * as chai from 'chai'
|
||||
import dirtyChai = require('dirty-chai')
|
||||
import * as ChildProcess from 'child_process'
|
||||
import * as path from 'path'
|
||||
import { emittedOnce } from './events-helpers'
|
||||
import { BrowserView, BrowserWindow } from 'electron'
|
||||
import { closeWindow } from './window-helpers';
|
||||
|
||||
const { expect } = chai
|
||||
chai.use(dirtyChai)
|
||||
|
||||
describe('BrowserView module', () => {
|
||||
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
15
yarn.lock
15
yarn.lock
|
@ -149,6 +149,13 @@
|
|||
"@types/connect" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/chai-as-promised@*":
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.1.tgz#004c27a4ac640e9590e25d8b0980cb0a6609bfd8"
|
||||
integrity sha512-dberBxQW/XWv6BMj0su1lV9/C9AUx5Hqu2pisuS6S4YK/Qt6vurcj/BmcbEsobIWWCQzhesNY8k73kIxx4X7Mg==
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
|
||||
"@types/chai-as-promised@^7.1.0":
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz#010b04cde78eacfb6e72bfddb3e58fe23c2e78b9"
|
||||
|
@ -168,6 +175,14 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/dirty-chai@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/dirty-chai/-/dirty-chai-2.0.0.tgz#f0a901f7283bef590087b0be931702da2c57aaae"
|
||||
integrity sha512-ff9dIwiqNQK7yqRkI5E9z1OZbS6KllMyyxSYNvwrQ8G/OHA3xZ/TFc4/wvrQQgyJvsUBxUa6EG1olSPkQHpvfg==
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
"@types/chai-as-promised" "*"
|
||||
|
||||
"@types/eslint-visitor-keys@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
|
||||
|
|
Загрузка…
Ссылка в новой задаче