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:
Jack Franklin
2020-06-19 14:15:13 +01:00
committed by GitHub
parent 5ff698ec98
commit 7a4170fe6e
6 changed files with 1 additions and 56 deletions

View File

@@ -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();