mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
26 lines
665 B
TypeScript
26 lines
665 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { waitFor } from 'next-test-utils'
|
|
|
|
describe('turbopack-loader-file-dependencies', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should update when the dependency file changes', async () => {
|
|
const $ = await next.render$('/')
|
|
const initialText = await $('p').text()
|
|
expect(initialText).toBeTruthy()
|
|
|
|
await next.patchFile(
|
|
'utils/file-dependency.ts',
|
|
'export const magicValue = "magic-value-2";'
|
|
)
|
|
|
|
await waitFor(1000)
|
|
|
|
const $2 = await next.render$('/')
|
|
const newText = await $2('p').text()
|
|
expect(newText).not.toBe(initialText)
|
|
})
|
|
})
|