diff --git a/src/browser-detection/browser-detection.js b/src/browser-detection/browser-detection.js index 0f01ecf..780d577 100644 --- a/src/browser-detection/browser-detection.js +++ b/src/browser-detection/browser-detection.js @@ -8,6 +8,7 @@ /*jshint esversion: 6 */ const { UAParser } = require('../main/ua-parser'); +const { EngineName } = require('../enums/ua-parser-enums'); const { isStandalonePWA } = require('is-standalone-pwa'); const { isFromEU } = require('detect-europe-js'); @@ -17,8 +18,9 @@ const isChromeFamily = val => !!( val.engine )?.is(EngineName.BLINK)); -const isElectron = () => !!(process?.versions?.hasOwnProperty('electron') || // node.js - / electron\//i.test(navigator?.userAgent)); // browser +const isElectron = () => !!( + process?.versions?.hasOwnProperty('electron') || // node.js + / electron\//i.test(navigator?.userAgent)); // browser module.exports = { isChromeFamily, diff --git a/test/unit/submodules/extensions.spec.js b/test/unit/submodules/extensions.spec.js index 90868e4..430f56a 100644 --- a/test/unit/submodules/extensions.spec.js +++ b/test/unit/submodules/extensions.spec.js @@ -19,7 +19,7 @@ describe('Extensions', () => { ['Vehicles', 'vehicle', Vehicles] ] .forEach(([desc, path, ext]) => { - const tests = require(`../data/ua/extension/${path}.json`); + const tests = require(`../../data/ua/extension/${path}.json`); describe(desc, () => { tests.forEach((test) => { it(`Can detect ${test.desc}: "${test.ua}"`, () => {