Unverified Commit a3de8769 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

test: assert the logs has updated after revaluate js value (#74686)

parent 47639cb6
......@@ -42,6 +42,8 @@ describe('ReactRefreshRequire app', () => {
// We only edited Bar, and it accepted.
// So we expect it to re-run alone.
await session.evaluate(() => ((window as any).log = []))
expect(await session.evaluate(() => (window as any).log)).toEqual([])
await session.patch(
'./bar.js',
`window.log.push('init BarV2'); export default function Bar() { return null; };`
......@@ -53,6 +55,8 @@ describe('ReactRefreshRequire app', () => {
// We only edited Bar, and it accepted.
// So we expect it to re-run alone.
await session.evaluate(() => ((window as any).log = []))
expect(await session.evaluate(() => (window as any).log)).toEqual([])
await session.patch(
'./bar.js',
`window.log.push('init BarV3'); export default function Bar() { return null; };`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment