From 91394b257ca9b7a595a3941cb730fba1342ef31c Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Mon, 9 Aug 2021 14:05:51 -0400 Subject: [PATCH] test(test-runner): add tests to show that grep is case insensitive (#8091) --- tests/playwright-test/match-grep.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/playwright-test/match-grep.spec.ts b/tests/playwright-test/match-grep.spec.ts index 218cbad512..a61632a338 100644 --- a/tests/playwright-test/match-grep.spec.ts +++ b/tests/playwright-test/match-grep.spec.ts @@ -87,3 +87,15 @@ test('should grep invert test name', async ({ runInlineTest }) => { expect(result.skipped).toBe(0); expect(result.exitCode).toBe(0); }); + +test('should be case insensitive by default', async ({ runInlineTest }) => { + const result = await runInlineTest(files, { 'grep': 'TesT Cc' }); + expect(result.passed).toBe(3); + expect(result.skipped).toBe(0); + expect(result.exitCode).toBe(0); +}); + +test('should be case sensitive by default with a regex', async ({ runInlineTest }) => { + const result = await runInlineTest(files, { 'grep': '/TesT Cc/' }); + expect(result.passed).toBe(0); +});