Skip to content

Commit a870c25

Browse files
authored
chore: update expectations for Firefox when evaluate fails (#8890)
1 parent 2d50ec5 commit a870c25

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/src/page.spec.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ describe('Page', function () {
16931693
});
16941694

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

16981698
await page.goto(server.EMPTY_PAGE);
16991699
let error!: Error;
@@ -1702,7 +1702,11 @@ describe('Page', function () {
17021702
} catch (error_) {
17031703
error = error_ as Error;
17041704
}
1705-
expect(error.message).toContain('Could not load script');
1705+
if (isFirefox) {
1706+
expect(error.message).toBeTruthy();
1707+
} else {
1708+
expect(error.message).toContain('Could not load script');
1709+
}
17061710
});
17071711

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

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

18201824
await page.goto(server.EMPTY_PAGE);
18211825
let error!: Error;
@@ -1824,7 +1828,11 @@ describe('Page', function () {
18241828
} catch (error_) {
18251829
error = error_ as Error;
18261830
}
1827-
expect(error.message).toContain('Could not load style');
1831+
if (isFirefox) {
1832+
expect(error.message).toBeTruthy();
1833+
} else {
1834+
expect(error.message).toContain('Could not load style');
1835+
}
18281836
});
18291837

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

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