Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: clean up test
  • Loading branch information
syi0808 committed Jul 4, 2024
commit 65034bde69e7378c6969044e37284dd9f851ce00
19 changes: 5 additions & 14 deletions test/e2e/app-dir/next-script/next-script.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import { nextTestSetup } from 'e2e-utils'
import { BrowserInterface } from '../../../lib/browsers/base'

describe('Script component with crossOrigin props', () => {
const { next } = nextTestSetup({
files: __dirname,
})

it('should be set crossOrigin also in preload link tag', async () => {
let browser: BrowserInterface
const browser = await next.browser('/')

try {
browser = await next.browser('/')
const crossorigin = await browser
.elementByCss('link[href="https://code.jquery.com/jquery-3.7.1.min.js"]')
.getAttribute('crossorigin')

expect(
await browser
.elementByCss(
'link[href="https://code.jquery.com/jquery-3.7.1.min.js"]'
)
.getAttribute('crossorigin')
).toBe('use-credentials')
} finally {
if (browser) await browser.close()
}
expect(crossorigin).toBe('use-credentials')
})
})