Skip to content

Commit

Permalink
fix: properly expose top-level devices (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Jan 28, 2020
1 parent e9515f4 commit 54f442e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions test/launcher.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
});
});

Expand Down

0 comments on commit 54f442e

Please sign in to comment.