diff --git a/src/model/cloud-runner/tests/cloud-runner-sync-environment.test.ts b/src/model/cloud-runner/tests/cloud-runner-sync-environment.test.ts index 71719f8c..30cbb8fe 100644 --- a/src/model/cloud-runner/tests/cloud-runner-sync-environment.test.ts +++ b/src/model/cloud-runner/tests/cloud-runner-sync-environment.test.ts @@ -109,10 +109,8 @@ describe('Cloud Runner Sync Environments', () => { const fullNameEqualValue = `${element.name}=${element.value}`; expect(newLinePurgedFile).toContain(fullNameEqualValue); - const count = ( - newLinePurgedFile.replace(//g, '\n').match(`/${fullNameEqualValue.replace(//g, '\n')}/g`) || [] - ).length; - expect(count).toEqual(1); + // should not contain more than once + expect(newLinePurgedFile.replace('fullNameEqualValue', '')).not.toContain(fullNameEqualValue); } } }, 10000000);