From 76b1e2bd0d45e1aa2e4d82ce4bd9acaddd69c33f Mon Sep 17 00:00:00 2001 From: Andrew Goldis Date: Tue, 19 Sep 2023 15:28:04 -0700 Subject: [PATCH] chore: use match to get filenames --- e2e/cypress-compatibility/__tests__/run.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e2e/cypress-compatibility/__tests__/run.test.ts b/e2e/cypress-compatibility/__tests__/run.test.ts index 3fd1493..0d6a800 100644 --- a/e2e/cypress-compatibility/__tests__/run.test.ts +++ b/e2e/cypress-compatibility/__tests__/run.test.ts @@ -33,10 +33,15 @@ describe(`Cypress ${cypressVersion} compatibility`, () => { }); }); + it("should have the right cypress version", async () => { + expect(result.config).toMatchObject({ + version: expect.stringContaining(`${cypressVersion}`), + }); + }); + it("should have compatible config", async () => { expect(result.config).toMatchObject({ video: config.video, - version: expect.stringContaining(`${cypressVersion}`), }); }); @@ -50,7 +55,7 @@ describe(`Cypress ${cypressVersion} compatibility`, () => { // @ts-ignore const actual = result.runs.find( // @ts-ignore - (run) => run.spec.name === spec + (run) => run.spec.name.match(`${spec}`) ); // @ts-ignore