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

Diff for: test/evaluation.spec.js

+2-2
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)