silverwolf-x's picture
download
raw
1.07 kB
import { nextTestSetup } from 'e2e-utils'
import { waitForNoRedbox } from 'next-test-utils'
describe('hmr-iframe', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should do HMR when rendering two server component changes at the same time', async () => {
let browser = await next.browser('/page1')
expect(
await (await (await browser.elementByCss('iframe')).contentFrame())
.locator('p')
.innerText()
).toEqual('content')
let cliOutputLength = next.cliOutput.length
await next.patchFile('app/page2/page.tsx', (content) =>
content.replace('content', 'content-new')
)
await waitForNoRedbox(browser)
expect(
await (await (await browser.elementByCss('iframe')).contentFrame())
.locator('p')
.innerText()
).toEqual('content-new')
const cliOutput = next.cliOutput.slice(cliOutputLength)
expect(cliOutput).not.toContain('Error')
expect(cliOutput).not.toContain('Could not find the module')
await next.stop()
await next.clean()
})
})

Xet Storage Details

Size:
1.07 kB
·
Xet hash:
aced5fb43c7c6026e73314b2c9aa594608e5d54d9f9e363959099c84a58af2c1

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.