From 8e55c8c65cd6613debf996fd73d7a3dfe7c4dc4b Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Sun, 20 Sep 2026 23:02:50 -0400 Subject: [PATCH] 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 --- .../terminal/document/document-parse-time-effects.test.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mobile/src/terminal/document/document-parse-time-effects.test.ts b/mobile/src/terminal/document/document-parse-time-effects.test.ts index 54f03eceaca..4683e9003e2 100644 --- a/mobile/src/terminal/document/document-parse-time-effects.test.ts +++ b/mobile/src/terminal/document/document-parse-time-effects.test.ts @@ -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') })