mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-12 20:03:03 +03:00
fix: properly expose top-level devices (#698)
This commit is contained in:
parent
e9515f46d2
commit
54f442e0f4
2
index.js
2
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');
|
||||
|
@ -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']);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user