style(mobile): reverse the stop order without mutating the list

`Array#reverse` mutates, which the lint rule refuses and which would have left the census
comparing a list it had just reordered. `toReversed` on the filtered copy says the same thing
and cannot.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
Jinwoo-H
2026-09-20 23:02:50 -04:00
parent 438bb24777
commit 8e55c8c65c
@@ -296,10 +296,7 @@ describe('the document modules at parse time', () => {
// stopped in the reverse of the order it was started in, and the frames go last of all.
const paired = started.filter((name) => stopped.includes(name.replace(/^start/, 'stop')))
expect(paired.map((name) => name.replace(/^start/, 'stop'))).toEqual(
stopped
.filter((name) => paired.includes(name.replace(/^stop/, 'start')))
.slice()
.reverse()
stopped.filter((name) => paired.includes(name.replace(/^stop/, 'start'))).toReversed()
)
expect(sequenceCalls('stopTerminalDocument').at(-1)).toBe('cancelDocumentFrames')
})