From 0f3ada81af50bdbd3ca8a845dacacc699c910548 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Tue, 27 Aug 2024 00:19:31 +0900 Subject: [PATCH] Fix flakiness for `test/e2e/__tests__/restart.ts` --- test/e2e/__tests__/restart.ts | 2 +- test/e2e/workspace/defaults/restart.css | 1 + test/e2e/workspace/defaults/stylelint.config.js | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 test/e2e/workspace/defaults/restart.css diff --git a/test/e2e/__tests__/restart.ts b/test/e2e/__tests__/restart.ts index b4a59990..0858017a 100644 --- a/test/e2e/__tests__/restart.ts +++ b/test/e2e/__tests__/restart.ts @@ -10,7 +10,7 @@ describe('Restart command', () => { }); it('should restart the language server', async () => { - const { document } = await openDocument('defaults/lint.css'); + const { document } = await openDocument('defaults/restart.css'); const diagnostics1 = await waitForDiagnostics(document); await commands.executeCommand('stylelint.restart'); diff --git a/test/e2e/workspace/defaults/restart.css b/test/e2e/workspace/defaults/restart.css new file mode 100644 index 00000000..077f6dd7 --- /dev/null +++ b/test/e2e/workspace/defaults/restart.css @@ -0,0 +1 @@ +a {} diff --git a/test/e2e/workspace/defaults/stylelint.config.js b/test/e2e/workspace/defaults/stylelint.config.js index e2b946f4..d389f279 100644 --- a/test/e2e/workspace/defaults/stylelint.config.js +++ b/test/e2e/workspace/defaults/stylelint.config.js @@ -16,6 +16,10 @@ const config = { 'plugin/foo-bar': true, }, }, + { + files: ['restart.css'], + rules: { 'block-no-empty': true }, + }, ], };