diff --git a/src/resources/extensions/sf/tests/uok-gitops-wiring.test.ts b/src/resources/extensions/sf/tests/uok-gitops-wiring.test.ts index c1705d481..77e89b82c 100644 --- a/src/resources/extensions/sf/tests/uok-gitops-wiring.test.ts +++ b/src/resources/extensions/sf/tests/uok-gitops-wiring.test.ts @@ -9,8 +9,13 @@ const sfDir = join(__dirname, ".."); test("post-unit pre-verification selects turn git action from UOK gitops flags", () => { const source = readFileSync(join(sfDir, "auto-post-unit.ts"), "utf-8"); + // Whitespace-tolerant: collapse runs of whitespace before substring-matching + // so the assertion survives formatter changes (single-line vs multi-line + // ternary). The semantic check is that turnAction is derived from + // uokFlags.gitops + uokFlags.gitopsTurnAction with a "commit" fallback. + const normalized = source.replace(/\s+/g, " "); assert.ok( - source.includes( + normalized.includes( 'const turnAction: TurnGitActionMode = uokFlags.gitops ? uokFlags.gitopsTurnAction : "commit"', ), "postUnitPreVerification should derive turn action from uok.gitops.turn_action when enabled",