Use electabul to instrument and report coverage

This commit is contained in:
Kevin Sawicki 2016-08-03 14:12:05 -07:00
parent 2c0de93f06
commit ad07a20d9a
6 changed files with 30 additions and 183 deletions

View file

@ -997,6 +997,7 @@ describe('browser-window module', function () {
describe('dev tool extensions', function () {
describe('BrowserWindow.addDevToolsExtension', function () {
let showPanelIntevalId
this.timeout(10000)
beforeEach(function () {
@ -1008,7 +1009,7 @@ describe('browser-window module', function () {
assert.equal(BrowserWindow.getDevToolsExtensions().hasOwnProperty('foo'), true)
w.webContents.on('devtools-opened', function () {
var showPanelIntevalId = setInterval(function () {
showPanelIntevalId = setInterval(function () {
if (w && w.devToolsWebContents) {
var showLastPanel = function () {
var lastPanelId = WebInspector.inspectorView._tabbedPane._tabs.peekLast().id
@ -1024,6 +1025,10 @@ describe('browser-window module', function () {
w.loadURL('about:blank')
})
afterEach(function () {
clearInterval(showPanelIntevalId)
})
it('throws errors for missing manifest.json files', function () {
assert.throws(function () {
BrowserWindow.addDevToolsExtension(path.join(__dirname, 'does-not-exist'))