mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Implements https://x.com/sebmarkbage/status/1842240773867126939 supersedes and closes #66054 (with permission)
23 lines
616 B
TypeScript
23 lines
616 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { retry } from 'next-test-utils'
|
|
|
|
describe('temporary-references', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it.each(['edge', 'node'])(
|
|
'should return the same object that was sent to the action (%s)',
|
|
async (runtime) => {
|
|
const browser = await next.browser('/' + runtime)
|
|
expect(await browser.elementByCss('p').text()).toBe('initial')
|
|
|
|
await browser.elementByCss('button').click()
|
|
|
|
await retry(async () => {
|
|
expect(await browser.elementByCss('p').text()).toBe('identical')
|
|
})
|
|
}
|
|
)
|
|
})
|