Skip to content

Commit e2db16f

Browse files
yury-saslushnikov
authored andcommitted
fix(tests): make eval test resilient to error format (#4793)
Make eval test resilient to variations in error message format between browsers.This will make the test pass without alternations in WebKit as well as Crhrome and Firefox.
1 parent 932c8cb commit e2db16f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/evaluation.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ module.exports.addTests = function({testRunner, expect}) {
121121
});
122122
it('should reject promise with exception', async({page, server}) => {
123123
let error = null;
124-
await page.evaluate(() => not.existing.object.property).catch(e => error = e);
124+
await page.evaluate(() => not_existing_object.property).catch(e => error = e);
125125
expect(error).toBeTruthy();
126-
expect(error.message).toContain('not is not defined');
126+
expect(error.message).toContain('not_existing_object');
127127
});
128128
it('should support thrown strings as error messages', async({page, server}) => {
129129
let error = null;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy