From 2eaafc38f6a261e3014ae78b14b3cc9dd08dae9c Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Wed, 29 Apr 2026 17:31:01 -0400 Subject: [PATCH] test(ecc2): normalize release workflow newlines --- tests/scripts/release.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/release.test.js b/tests/scripts/release.test.js index b255969c..080a3d00 100644 --- a/tests/scripts/release.test.js +++ b/tests/scripts/release.test.js @@ -21,6 +21,7 @@ const ciWorkflowPath = path.join(__dirname, '..', '..', '.github', 'workflows', const releaseWorkflowSource = fs.readFileSync(releaseWorkflowPath, 'utf8'); const reusableReleaseWorkflowSource = fs.readFileSync(reusableReleaseWorkflowPath, 'utf8'); const ciWorkflowSource = fs.readFileSync(ciWorkflowPath, 'utf8'); +const normalizedCiWorkflowSource = ciWorkflowSource.replace(/\r\n/g, '\n'); function test(name, fn) { try { @@ -126,7 +127,7 @@ function runTests() { })) passed++; else failed++; if (test('CI runs for release branches and version tags before release workflows execute', () => { - const pushBlockMatch = ciWorkflowSource.match(/on:\n\s+push:\n([\s\S]*?)\n\s+pull_request:/); + const pushBlockMatch = normalizedCiWorkflowSource.match(/on:\n\s+push:\n([\s\S]*?)\n\s+pull_request:/); const pushBlock = pushBlockMatch ? pushBlockMatch[1] : ''; assert.ok(pushBlock, 'ci.yml should define a push trigger block');