From 605984cd79819fb304ce82d46d6f7ad50ba721be Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Sun, 12 Jul 2026 16:49:58 -0400 Subject: [PATCH] test(#2177): use lint-clean .includes() for frontmatter-survival assertions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI lint (local/no-crlf-fragile-split + no-regex-spaces) flagged the regex assertions: a bare \n on readFileSync content is CRLF-fragile on Windows git-autocrlf, and literal double-spaces are hard to count. Switch to .includes() strings — same validation intent, lint-clean on all platforms. --- tests/state.test.cjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/state.test.cjs b/tests/state.test.cjs index 496d8ed4f..eaf61a34a 100644 --- a/tests/state.test.cjs +++ b/tests/state.test.cjs @@ -1337,11 +1337,11 @@ describe('cmdStateUpdateProgress (state update-progress)', () => { const updated = fs.readFileSync(path.join(tmpDir, '.planning', 'STATE.md'), 'utf-8'); // The body line advanced to 50% AND its descriptive suffix survived. - assert.ok(/Progress: \[█████░░░░░\] 50% \(1\/2 plans complete\)/.test(updated), + assert.ok(updated.includes('[█████░░░░░] 50% (1/2 plans complete)'), 'body Progress line must update to 50% with suffix preserved'); // The frontmatter block is intact (not mangled by the old \s*-crosses-newline match). - assert.ok(/ total_phases: 1\n/.test(updated), 'frontmatter total_phases key must survive'); - assert.ok(/ percent:/.test(updated), 'frontmatter percent key must survive'); + assert.ok(updated.includes('total_phases: 1'), 'frontmatter total_phases key must survive'); + assert.ok(updated.includes('percent:'), 'frontmatter percent key must survive'); }); test('#2177 descriptive suffix after the machine segment is preserved', () => {