Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
janicklas-ralph committed Aug 10, 2021
1 parent 5491d12 commit 0e5fab1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/next/client/script.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const LoadCache = new Set()
export interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {
strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive'
id?: string
onLoad?: () => void
onError?: () => void
onLoad?: (e: any) => void
onError?: (e: any) => void
children?: React.ReactNode
}

Expand Down
6 changes: 3 additions & 3 deletions test/integration/script-loader/pages/page3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const Page = () => {
strategy="lazyOnload"
></Script>
<Script
src="https://somebrokenlink.doesntexist"
src="https://example.com/doesntexist"
strategy="lazyOnload"
onError={(e) => {
console.log('error');
console.log(e);
console.log('error')
console.log(e)
}}
/>
<div>page3</div>
Expand Down
4 changes: 3 additions & 1 deletion test/integration/script-loader/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ describe('Script Loader', () => {
await waitFor(1000)

const logs = await browser.log('browser')
const filteredLogs = logs.filter((log) => !log.message.includes('Failed to load resource'))
const filteredLogs = logs.filter(
(log) => !log.message.includes('Failed to load resource')
)
expect(filteredLogs.length).toBe(0)

async function test(id) {
Expand Down

0 comments on commit 0e5fab1

Please sign in to comment.