mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Rename Page.Events.Error into Page.Events.PageError
The 'error' event has a special treatment in Node: https://nodejs.org/api/events.html#events_error_events To avoid this, this patch renames the 'error' event into the 'pageerror'.
This commit is contained in:
@@ -336,9 +336,9 @@ describe('Puppeteer', function() {
|
||||
}));
|
||||
});
|
||||
|
||||
describe('Page.Events.Error', function() {
|
||||
describe('Page.Events.PageError', function() {
|
||||
it('should fire', function(done) {
|
||||
page.on('error', error => {
|
||||
page.on('pageerror', error => {
|
||||
expect(error.message).toContain('Fancy');
|
||||
done();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user