From 647e28a48e50e73169fd0ade5d9d9e41fae9bbea Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Thu, 2 Jul 2026 02:27:17 +0700 Subject: [PATCH] test(editor): rename armed flag to isArmed per boolean-naming rule Co-Authored-By: Claude Opus 4.8 --- .../markdown-editor/markdown-editor-history.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/shared/markdown-editor/markdown-editor-history.test.ts b/frontend/src/components/shared/markdown-editor/markdown-editor-history.test.ts index 7ba5b8eb..104123ac 100644 --- a/frontend/src/components/shared/markdown-editor/markdown-editor-history.test.ts +++ b/frontend/src/components/shared/markdown-editor/markdown-editor-history.test.ts @@ -18,7 +18,7 @@ beforeAll(() => { // pre-updateState `newState` has a `before` doc that no longer matches — ProseMirror throws "Applying a // mismatched transaction". This synthetic plugin forces that advance on demand; jsdom's real editor never // hits the browser timing that triggers it, so the fault has to be simulated to be regression-tested. -let armed = false; +let isArmed = false; const AdvanceStateOnUpdate = Extension.create({ addProseMirrorPlugins() { @@ -30,8 +30,8 @@ const AdvanceStateOnUpdate = Extension.create({ // calling `update`. Dispatching here fires mid-reconfigure, advancing view.state exactly as the // real prod crash does. view: (view) => { - if (armed) { - armed = false; + if (isArmed) { + isArmed = false; let pos = 1; @@ -63,7 +63,7 @@ it('resetUndoHistory survives view.state advancing during updateState', () => { extensions: [...createMarkdownExtensions(), AdvanceStateOnUpdate], }); - armed = true; + isArmed = true; expect(() => resetUndoHistory(editor)).not.toThrow();