diff --git a/index.js b/index.js index 4d745cee49..feee61d4da 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ const { helper } = require('./lib/helper'); const api = require('./lib/api'); const packageJson = require('./package.json'); -const DeviceDescriptors = require('./lib/deviceDescriptors'); +const { DeviceDescriptors } = require('./lib/deviceDescriptors'); const { TimeoutError } = require('./lib/errors'); const { Chromium } = require('./lib/server/chromium'); const { Firefox } = require('./lib/server/firefox'); diff --git a/test/launcher.spec.js b/test/launcher.spec.js index f0fe24fa46..ac56a330b3 100644 --- a/test/launcher.spec.js +++ b/test/launcher.spec.js @@ -138,7 +138,9 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p }); it('should require top-level DeviceDescriptors', async() => { const Devices = require(path.join(utils.projectRoot(), '/lib/deviceDescriptors.js')).DeviceDescriptors; + expect(Devices['iPhone 6']).toBeTruthy(); expect(Devices['iPhone 6']).toBe(playwright.devices['iPhone 6']); + expect(Devices['iPhone 6']).toBe(require(playwrightPath).devices['iPhone 6']); }); });