diff --git a/lib/common/api/callbacks-registry.js b/lib/common/api/callbacks-registry.js index 1aca6104e79c..b189dccd68ee 100644 --- a/lib/common/api/callbacks-registry.js +++ b/lib/common/api/callbacks-registry.js @@ -26,8 +26,8 @@ class CallbacksRegistry { while ((match = regexp.exec(stackString)) !== null) { const location = match[1] - if (location.indexOf('(native)') !== -1) continue - if (location.indexOf('electron.asar') !== -1) continue + if (location.includes('native')) continue + if (location.includes('electron.asar')) continue ref = /([^/^)]*)\)?$/gi.exec(location) filenameAndLine = ref[1] diff --git a/spec/api-callbacks-registry-spec.js b/spec/api-callbacks-registry-spec.js index 103bcbe8644e..866a3921e9fc 100644 --- a/spec/api-callbacks-registry-spec.js +++ b/spec/api-callbacks-registry-spec.js @@ -1,7 +1,7 @@ const assert = require('assert') const {CallbacksRegistry} = require('electron') -describe.only('CallbacksRegistry module', () => { +describe('CallbacksRegistry module', () => { let registry = null beforeEach(() => {