mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: remove top level errors and DeviceDescriptors (#6043)
As far as I can tell these became irrelevant as of v1.15 which added
`puppeteer.errors` and `puppeteer.devices [1]. This is a breaking change
but one that's easily mitigated. We've said that we don't consider
changes to our folder/file structure a breaking change, but we can't
really do that if we have these two top level files that we've
documented.
[1]: e3abb0aa32 (diff-522b24108d7446af4c59873472a90444)
This commit is contained in:
@@ -592,22 +592,6 @@ describe('Launcher specs', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Top-level requires', function () {
|
||||
it('should require top-level Errors', async () => {
|
||||
const { puppeteer, puppeteerPath } = getTestState();
|
||||
const Errors = require(path.join(puppeteerPath, '/Errors'));
|
||||
expect(Errors.TimeoutError).toBe(puppeteer.errors.TimeoutError);
|
||||
});
|
||||
it('should require top-level DeviceDescriptors', async () => {
|
||||
const { puppeteer, puppeteerPath } = getTestState();
|
||||
const { devicesMap } = require(path.join(
|
||||
puppeteerPath,
|
||||
'/DeviceDescriptors'
|
||||
));
|
||||
expect(devicesMap['iPhone 6']).toBe(puppeteer.devices['iPhone 6']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Browser target events', function () {
|
||||
itFailsFirefox('should work', async () => {
|
||||
const { server, puppeteer, defaultBrowserOptions } = getTestState();
|
||||
|
||||
Reference in New Issue
Block a user