Skip to content

Commit

Permalink
chore: update expectations for Firefox when evaluate fails (#8890)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Sep 2, 2022
1 parent 2d50ec5 commit a870c25
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/src/page.spec.ts
Expand Up @@ -1693,7 +1693,7 @@ describe('Page', function () {
});

it('should throw an error if loading from url fail', async () => {
const {page, server} = getTestState();
const {page, server, isFirefox} = getTestState();

await page.goto(server.EMPTY_PAGE);
let error!: Error;
Expand All @@ -1702,7 +1702,11 @@ describe('Page', function () {
} catch (error_) {
error = error_ as Error;
}
expect(error.message).toContain('Could not load script');
if (isFirefox) {
expect(error.message).toBeTruthy();
} else {
expect(error.message).toContain('Could not load script');
}
});

it('should work with a path', async () => {
Expand Down Expand Up @@ -1815,7 +1819,7 @@ describe('Page', function () {
});

it('should throw an error if loading from url fail', async () => {
const {page, server} = getTestState();
const {page, server, isFirefox} = getTestState();

await page.goto(server.EMPTY_PAGE);
let error!: Error;
Expand All @@ -1824,7 +1828,11 @@ describe('Page', function () {
} catch (error_) {
error = error_ as Error;
}
expect(error.message).toContain('Could not load style');
if (isFirefox) {
expect(error.message).toBeTruthy();
} else {
expect(error.message).toContain('Could not load style');
}
});

it('should work with a path', async () => {
Expand Down

0 comments on commit a870c25

Please sign in to comment.