Skip to content

Commit e8762b6

Browse files
committed
test: run the probed-duration decision test in the default environment
The file opts into jsdom but never touches the DOM: it calls `documentAfterProbedDuration` directly and asserts on the document it returns. vitest.config.ts makes `node` the default for exactly this reason and the docblock is the opt-in — 972ms of environment setup here bought nothing.
1 parent 3e840a1 commit e8762b6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/components/ai-edition/NewEditorShell.probedDuration.test.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// @vitest-environment jsdom
21
// The decision a `loadedmetadata` event makes, on its own.
32
//
43
// The event itself arrives through Preview -> PreviewCanvas -> VirtualPreview and a
5-
// real <video>, which jsdom never fires, so the component cannot be driven end to
6-
// end here. `documentAfterProbedDuration` is the part that decides what gets
4+
// real <video>, which no test environment here can decode, so the component cannot
5+
// be driven end to end. `documentAfterProbedDuration` is the part that decides what gets
76
// written, and both guards below live in it: the queue the shell puts this write on
87
// is what makes them necessary, because it puts real time between the event and the
98
// write. The queue's own serialization is covered by useSequentialTimelineOps.test.

0 commit comments

Comments
 (0)