do more manual cleanup and specify globals
This commit is contained in:
parent
f47fa25e39
commit
c4b6cf4a8e
10 changed files with 21 additions and 8 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
/* globals $, xit */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const asar = process.binding('atom_common_asar')
|
const asar = process.binding('atom_common_asar')
|
||||||
const child_process = require('child_process')
|
const child_process = require('child_process')
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* globals InspectorFrontendHost, WebInspector, DevToolsAPI, DevToolsAPI, Blob */
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
// Use menu API to show context menu.
|
// Use menu API to show context menu.
|
||||||
InspectorFrontendHost.showContextMenuAtPoint = createMenu
|
InspectorFrontendHost.showContextMenuAtPoint = createMenu
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
},
|
},
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": ["/vendor"],
|
"ignore": ["/vendor"],
|
||||||
"globals": ["afterEach", "beforeEach", "describe", "it", "location"]
|
"globals": ["$", "after", "afterEach", "before",
|
||||||
|
"beforeEach", "describe", "it", "location"]
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* globals $ */
|
||||||
|
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const http = require('http')
|
const http = require('http')
|
||||||
const qs = require('querystring')
|
const qs = require('querystring')
|
||||||
|
|
4
spec/fixtures/module/fork_ping.js
vendored
4
spec/fixtures/module/fork_ping.js
vendored
|
@ -1,8 +1,10 @@
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
process.on('uncaughtException', function (error) {
|
process.on('uncaughtException', function (error) {
|
||||||
process.send(error.stack)
|
process.send(error.stack)
|
||||||
})
|
})
|
||||||
|
|
||||||
var child = require('child_process').fork(__dirname + '/ping.js')
|
var child = require('child_process').fork(path.join(__dirname, '/ping.js'))
|
||||||
process.on('message', function (msg) {
|
process.on('message', function (msg) {
|
||||||
child.send(msg)
|
child.send(msg)
|
||||||
})
|
})
|
||||||
|
|
2
spec/fixtures/module/function.js
vendored
2
spec/fixtures/module/function.js
vendored
|
@ -1 +1 @@
|
||||||
exports.aFunction = function () { return 1127; }
|
exports.aFunction = function () { return 1127 }
|
||||||
|
|
2
spec/fixtures/module/locale-compare.js
vendored
2
spec/fixtures/module/locale-compare.js
vendored
|
@ -2,6 +2,6 @@ process.on('message', function () {
|
||||||
process.send([
|
process.send([
|
||||||
'a'.localeCompare('a'),
|
'a'.localeCompare('a'),
|
||||||
'ä'.localeCompare('z', 'de'),
|
'ä'.localeCompare('z', 'de'),
|
||||||
'ä'.localeCompare('a', 'sv', { sensitivity: 'base' }),
|
'ä'.localeCompare('a', 'sv', { sensitivity: 'base' })
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* globals self, URL, Response */
|
||||||
|
|
||||||
self.addEventListener('fetch', function (event) {
|
self.addEventListener('fetch', function (event) {
|
||||||
var requestUrl = new URL(event.request.url)
|
var requestUrl = new URL(event.request.url)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* globals xit */
|
||||||
|
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const child_process = require('child_process')
|
const child_process = require('child_process')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
|
@ -17,7 +17,7 @@ var argv = require('yargs')
|
||||||
.argv
|
.argv
|
||||||
|
|
||||||
var window = null
|
var window = null
|
||||||
process.port = 0; // will be used by crash-reporter spec.
|
process.port = 0 // will be used by crash-reporter spec.
|
||||||
|
|
||||||
app.commandLine.appendSwitch('js-flags', '--expose_gc')
|
app.commandLine.appendSwitch('js-flags', '--expose_gc')
|
||||||
app.commandLine.appendSwitch('ignore-certificate-errors')
|
app.commandLine.appendSwitch('ignore-certificate-errors')
|
||||||
|
@ -48,7 +48,7 @@ ipcMain.on('process.exit', function (event, code) {
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.on('eval', function (event, script) {
|
ipcMain.on('eval', function (event, script) {
|
||||||
event.returnValue = eval(script)
|
event.returnValue = eval(script) // eslint-disable-line
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.on('echo', function (event, msg) {
|
ipcMain.on('echo', function (event, msg) {
|
||||||
|
@ -84,10 +84,10 @@ app.on('ready', function () {
|
||||||
height: 600,
|
height: 600,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
javascript: true // Test whether web preferences crashes.
|
javascript: true // Test whether web preferences crashes.
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
window.loadURL(url.format({
|
window.loadURL(url.format({
|
||||||
pathname: __dirname + '/index.html',
|
pathname: path.join(__dirname, '/index.html'),
|
||||||
protocol: 'file',
|
protocol: 'file',
|
||||||
query: {
|
query: {
|
||||||
grep: argv.grep,
|
grep: argv.grep,
|
||||||
|
|
Loading…
Add table
Reference in a new issue