Files
Zack TannerandGitHub e296bcb812 [tests]: remove unnecessary skipDeployment flags (#92423)
These tests won't ever be run in a deployed environment, so this removes
`skipDeployment` so it's easier to grok which tests are intentionally
disabled because they don't work when deployed.
2026-04-06 14:30:07 -07:00

38 lines
1.2 KiB
TypeScript

import { nextTestSetup } from 'e2e-utils'
describe('turbopack-import-assertions-use', () => {
const { next, isTurbopack } = nextTestSetup({
files: __dirname,
})
if (!isTurbopack) {
it('should skip for webpack', () => {})
return
}
it('should apply raw loader via turbopackUse import assertion', async () => {
const $ = await next.render$('/')
expect($('#raw').text()).toBe('Hello from raw text file')
})
it('should apply replace loader with options via turbopackUse import assertion', async () => {
const $ = await next.render$('/')
expect($('#replaced').text()).toBe('Value is: turbopackUse works!')
})
it('should apply raw loader with turbopackModuleType ecmascript', async () => {
const $ = await next.render$('/')
expect($('#module-type').text()).toBe('Hello via module type')
})
it('should apply identity loader with turbopackModuleType json', async () => {
const $ = await next.render$('/')
expect($('#json-type').text()).toBe('Hello from JSON module type')
})
it('should apply identity with loader rules', async () => {
const $ = await next.render$('/')
expect($('#json-type-2').text()).toBe('Hello from JSON module type 2')
})
})