File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
test/integration/script-loader Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ const LoadCache = new Set()
1010export interface ScriptProps extends ScriptHTMLAttributes < HTMLScriptElement > {
1111 strategy ?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive'
1212 id ?: string
13- onLoad ?: ( ) => void
14- onError ?: ( ) => void
13+ onLoad ?: ( e : any ) => void
14+ onError ?: ( e : any ) => void
1515 children ?: React . ReactNode
1616}
1717
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ const Page = () => {
1616 strategy = "lazyOnload"
1717 > </ Script >
1818 < Script
19- src = "https://somebrokenlink. doesntexist"
19+ src = "https://example.com/ doesntexist"
2020 strategy = "lazyOnload"
2121 onError = { ( e ) => {
22- console . log ( 'error' ) ;
23- console . log ( e ) ;
22+ console . log ( 'error' )
23+ console . log ( e )
2424 } }
2525 />
2626 < div > page3</ div >
Original file line number Diff line number Diff line change @@ -70,7 +70,9 @@ describe('Script Loader', () => {
7070 await waitFor ( 1000 )
7171
7272 const logs = await browser . log ( 'browser' )
73- const filteredLogs = logs . filter ( ( log ) => ! log . message . includes ( 'Failed to load resource' ) )
73+ const filteredLogs = logs . filter (
74+ ( log ) => ! log . message . includes ( 'Failed to load resource' )
75+ )
7476 expect ( filteredLogs . length ) . toBe ( 0 )
7577
7678 async function test ( id ) {
You can’t perform that action at this time.
0 commit comments