mirror of
https://github.com/stablyai/orca.git
synced 2026-09-26 08:02:38 +00:00
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:
@@ -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')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user