From fbcfdb5df23988385fecffd20feaa0f275e8e9f7 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Thu, 18 Jul 2024 10:29:07 +0200 Subject: [PATCH] show that component dependencies aren't yet understood --- tests/playwright-test/only-changed.spec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/playwright-test/only-changed.spec.ts b/tests/playwright-test/only-changed.spec.ts index aa27dc7e46..b78e6dab16 100644 --- a/tests/playwright-test/only-changed.spec.ts +++ b/tests/playwright-test/only-changed.spec.ts @@ -144,7 +144,7 @@ test('should throw nice error message if git doesnt work', async ({ setupReposit expect(result.output).toContain('only works with Git repositories'); }); -test('should suppport component tests', async ({ runInlineTest, setupRepository, writeFiles }) => { +test.only('should suppport component tests', async ({ runInlineTest, setupRepository, writeFiles }) => { const git = await setupRepository(); await writeFiles({ @@ -200,6 +200,17 @@ test('should suppport component tests', async ({ runInlineTest, setupRepository, expect(result2.failed).toBe(1); expect(result2.output).toContain('button2.test.tsx'); expect(result2.output).not.toContain('button.test.tsx'); + + git('commit -am "update button2 test"'); + + const result3 = await runInlineTest({ + 'src/button.tsx': ` + export const Button = () => ; + ` + }, { 'workers': 1, 'only-changed': true }); + + expect(result3.exitCode).toBe(1); + expect(result3.failed).toBe(2); }); test.describe('should work the same if being called in subdirectory', () => {