chore: finish replacing assert with expect in tests (#18215)
* spec: replace assert with expect in api-browser-view-spec.js * spec: replace assert with expect in api-touch-bar-spec.js * spec: replace assert with expect in api-web-frame-spec.js * spec: replace assert with expect in api-web-contents-view-spec.js * spec: replace assert with expect in security-warnings-spec.js * spec: replace assert with expect in api-menu-item-spec.js * spec: replace assert with expect in api-web-request-spec.js * spec: replace assert with expect in api-remote-spec.js * spec: replace assert with expect in api-session-spec.js * spec: replace assert with expect in api-system-preferences-spec.js * spec: replace assert with expect in api-browser-window-spec.js * spec: replace assert with expect in webview-spec.js * spec: replace assert with expect in api-net-spec.js * spec: replace assert with expect in api-protocol-spec.js * spec: replace assert with expect api-web-contents-spec.js * spec: replace assert with expect in api-shell-spec.js * spec: replace assert with expect in modules-spec.js * spec: replace assert with expect in chromium-spec.js * spec: replace assert with expect in api-crash-reporter-spec.js * spec: replace assert with expect in asar-spec.js * spec: rename assert-helpers to expect-helpers * address PR feedback
This commit is contained in:
parent
dbb8617214
commit
5a7b56b042
22 changed files with 1546 additions and 1591 deletions
|
@ -1,6 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const assert = require('assert')
|
||||
const chai = require('chai')
|
||||
const ChildProcess = require('child_process')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
|
@ -169,7 +168,7 @@ describe('BrowserView module', () => {
|
|||
|
||||
expect(view1.id).to.be.not.null()
|
||||
const views = w.getBrowserViews()
|
||||
expect(views.length).to.equal(2)
|
||||
expect(views).to.have.lengthOf(2)
|
||||
expect(views[0].webContents.id).to.equal(view1.webContents.id)
|
||||
expect(views[1].webContents.id).to.equal(view2.webContents.id)
|
||||
|
||||
|
@ -243,9 +242,9 @@ describe('BrowserView module', () => {
|
|||
w.setBrowserView(view)
|
||||
view.webContents.once('new-window', (e, url, frameName, disposition, options, additionalFeatures) => {
|
||||
e.preventDefault()
|
||||
assert.strictEqual(url, 'http://host/')
|
||||
assert.strictEqual(frameName, 'host')
|
||||
assert.strictEqual(additionalFeatures[0], 'this-is-not-a-standard-feature')
|
||||
expect(url).to.equal('http://host/')
|
||||
expect(frameName).to.equal('host')
|
||||
expect(additionalFeatures[0]).to.equal('this-is-not-a-standard-feature')
|
||||
done()
|
||||
})
|
||||
view.webContents.loadFile(path.join(fixtures, 'pages', 'window-open.html'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue