test(test-runner): add tests to show that grep is case insensitive (#8091)

This commit is contained in:
Joel Einbinder 2021-08-09 14:05:51 -04:00 committed by GitHub
parent f455b6edc0
commit 91394b257c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
});