chore: remove electabul (#15954)
This commit is contained in:
Родитель
cfb2812cea
Коммит
46e7214974
|
@ -12,7 +12,6 @@
|
|||
"colors": "^1.1.2",
|
||||
"dotenv-safe": "^4.0.4",
|
||||
"dugite": "^1.45.0",
|
||||
"electabul": "~0.0.4",
|
||||
"electron-docs-linter": "^2.4.0",
|
||||
"electron-typescript-definitions": "^3.0.0",
|
||||
"eslint": "^5.6.0",
|
||||
|
|
|
@ -54,15 +54,6 @@
|
|||
})
|
||||
}
|
||||
|
||||
function reportCoverage () {
|
||||
var message = JSON.stringify({
|
||||
pid: chrome.runtime.id,
|
||||
coverage: window.__coverage__
|
||||
})
|
||||
var coverageMessage = `require('electron').ipcRenderer.send('report-coverage', ${message})`
|
||||
window.chrome.devtools.inspectedWindow.eval(coverageMessage, function () {})
|
||||
}
|
||||
|
||||
testStorage(function (
|
||||
syncForSet, localForSet,
|
||||
syncForRemove, localForRemove,
|
||||
|
@ -86,7 +77,6 @@
|
|||
}
|
||||
})
|
||||
|
||||
reportCoverage()
|
||||
var sendMessage = `require('electron').ipcRenderer.send('answer', ${message})`
|
||||
window.chrome.devtools.inspectedWindow.eval(sendMessage, function () {})
|
||||
})
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
})
|
||||
}
|
||||
|
||||
const { Coverage } = require('electabul')
|
||||
const Mocha = require('mocha')
|
||||
const mochaOptions = {}
|
||||
if (process.env.MOCHA_REPORTER) {
|
||||
|
@ -101,14 +100,6 @@
|
|||
|
||||
Mocha.utils.highlightTags('code')
|
||||
|
||||
const coverage = new Coverage({
|
||||
libPath: path.join(__dirname, '..', '..', 'lib'),
|
||||
outputPath: path.join(__dirname, '..', '..', 'out', 'coverage'),
|
||||
formats: ['text', 'lcov']
|
||||
})
|
||||
coverage.addCoverage(ipcRenderer.sendSync('get-main-process-coverage'))
|
||||
coverage.generateReport()
|
||||
|
||||
if (isCi) {
|
||||
ipcRenderer.send('process.exit', runner.failures)
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ process.throwDeprecation = false
|
|||
const electron = require('electron')
|
||||
const { app, BrowserWindow, crashReporter, dialog, ipcMain, protocol, webContents } = electron
|
||||
|
||||
const { Coverage } = require('electabul')
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const util = require('util')
|
||||
|
@ -85,15 +83,6 @@ global.permissionChecks = {
|
|||
reject: () => electron.session.defaultSession.setPermissionCheckHandler(() => false)
|
||||
}
|
||||
|
||||
const coverage = new Coverage({
|
||||
outputPath: path.join(__dirname, '..', '..', 'out', 'coverage')
|
||||
})
|
||||
coverage.setup()
|
||||
|
||||
ipcMain.on('get-main-process-coverage', function (event) {
|
||||
event.returnValue = global.__coverage__ || null
|
||||
})
|
||||
|
||||
global.isCi = !!argv.ci
|
||||
if (global.isCi) {
|
||||
process.removeAllListeners('uncaughtException')
|
||||
|
|
Загрузка…
Ссылка в новой задаче