mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: introduce puppeteer/Errors (#3056)
This patch adds a new require, `puppeteer/Errors`, that holds all the Puppeteer-specific error classes. Currently, the only custom error class we use is `TimeoutError`. We'll expand in future with `CrashError` and some others. Fixes #1694.
This commit is contained in:
@@ -16,12 +16,13 @@
|
||||
|
||||
const path = require('path');
|
||||
const utils = require('./utils');
|
||||
const DeviceDescriptors = utils.requireRoot('DeviceDescriptors');
|
||||
const iPhone = DeviceDescriptors['iPhone 6'];
|
||||
|
||||
module.exports.addTests = function({testRunner, expect, DeviceDescriptors}) {
|
||||
module.exports.addTests = function({testRunner, expect}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
const iPhone = DeviceDescriptors['iPhone 6'];
|
||||
describe('input', function() {
|
||||
it('should click the button', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/input/button.html');
|
||||
|
||||
Reference in New Issue
Block a user