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:
Andrey Lushnikov
2017-07-06 11:22:32 -07:00
parent 19e882f505
commit 64fed38c60
3 changed files with 7 additions and 5 deletions

View File

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