chore: lint spec-main (#20835)

This commit is contained in:
Jeremy Apthorp 2019-11-01 13:37:02 -07:00 committed by GitHub
parent 1fed1ed577
commit ecd9e1f26e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 589 additions and 533 deletions

View file

@ -3,7 +3,7 @@ import * as http from 'http'
import * as qs from 'querystring'
import * as path from 'path'
import { session, WebContents, webContents } from 'electron'
import { AddressInfo } from 'net';
import { AddressInfo } from 'net'
const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures')
@ -40,7 +40,7 @@ describe('webRequest module', () => {
let contents: WebContents = null as unknown as WebContents
// NB. sandbox: true is used because it makes navigations much (~8x) faster.
before(async () => {
contents = (webContents as any).create({sandbox: true})
contents = (webContents as any).create({ sandbox: true })
await contents.loadFile(path.join(fixturesPath, 'pages', 'jquery.html'))
})
after(() => (contents as any).destroy())
@ -103,7 +103,7 @@ describe('webRequest module', () => {
})
await expect(ajax(defaultURL, {
type: 'POST',
data: postData,
data: postData
})).to.eventually.be.rejectedWith('404')
})
@ -227,7 +227,7 @@ describe('webRequest module', () => {
})
const { headers } = await contents.executeJavaScript(`new Promise((resolve, reject) => {
const options = {
...${JSON.stringify({url: defaultURL})},
...${JSON.stringify({ url: defaultURL })},
success: (data, status, request) => {
reject(new Error('expected failure'))
},