@@ -1693,7 +1693,7 @@ describe('Page', function () {
1693
1693
} ) ;
1694
1694
1695
1695
it ( 'should throw an error if loading from url fail' , async ( ) => {
1696
- const { page, server} = getTestState ( ) ;
1696
+ const { page, server, isFirefox } = getTestState ( ) ;
1697
1697
1698
1698
await page . goto ( server . EMPTY_PAGE ) ;
1699
1699
let error ! : Error ;
@@ -1702,7 +1702,11 @@ describe('Page', function () {
1702
1702
} catch ( error_ ) {
1703
1703
error = error_ as Error ;
1704
1704
}
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
+ }
1706
1710
} ) ;
1707
1711
1708
1712
it ( 'should work with a path' , async ( ) => {
@@ -1815,7 +1819,7 @@ describe('Page', function () {
1815
1819
} ) ;
1816
1820
1817
1821
it ( 'should throw an error if loading from url fail' , async ( ) => {
1818
- const { page, server} = getTestState ( ) ;
1822
+ const { page, server, isFirefox } = getTestState ( ) ;
1819
1823
1820
1824
await page . goto ( server . EMPTY_PAGE ) ;
1821
1825
let error ! : Error ;
@@ -1824,7 +1828,11 @@ describe('Page', function () {
1824
1828
} catch ( error_ ) {
1825
1829
error = error_ as Error ;
1826
1830
}
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
+ }
1828
1836
} ) ;
1829
1837
1830
1838
it ( 'should work with a path' , async ( ) => {
0 commit comments