mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-30 00:23:30 +00:00
test(app): stabilize offset observer test (#38044)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
parent
7111f93836
commit
fd97d789ef
1 changed files with 5 additions and 5 deletions
|
|
@ -38,17 +38,17 @@ test("reports a divergent native offset once and ignores equal offsets and unrel
|
|||
instance.scrollOffset = offset
|
||||
})
|
||||
|
||||
document.body.append(unrelated)
|
||||
unrelated.remove()
|
||||
await frames(2)
|
||||
expect(calls).toEqual([])
|
||||
|
||||
route.remove()
|
||||
document.body.append(route)
|
||||
await new Promise((resolve) => setTimeout(resolve, 0))
|
||||
await frames(3)
|
||||
expect(calls).toEqual([[0, false]])
|
||||
|
||||
document.body.append(unrelated)
|
||||
unrelated.remove()
|
||||
await frames(2)
|
||||
expect(calls).toEqual([[0, false]])
|
||||
|
||||
route.remove()
|
||||
document.body.append(route)
|
||||
await new Promise((resolve) => setTimeout(resolve, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue