Browse Source

fix includes

Shelley Vohr 7 years ago
parent
commit
f5c04c7037
2 changed files with 3 additions and 3 deletions
  1. 2 2
      lib/common/api/callbacks-registry.js
  2. 1 1
      spec/api-callbacks-registry-spec.js

+ 2 - 2
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]

+ 1 - 1
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(() => {