From 564d9bb6a782560aa37b245ba19ffe1d3d815838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Mon, 12 Aug 2024 13:07:45 +0200 Subject: [PATCH] test: update tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't use events anymore but update a Svelte store. Not sure how to test it. Signed-off-by: André Jaenisch --- .../molecules/SettingsAppearance.test.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/components/molecules/SettingsAppearance.test.ts b/tests/components/molecules/SettingsAppearance.test.ts index 195b333..365f1a2 100644 --- a/tests/components/molecules/SettingsAppearance.test.ts +++ b/tests/components/molecules/SettingsAppearance.test.ts @@ -48,24 +48,6 @@ describe('SettingsAppearance.svelte', () => { expect(screen.getByLabelText(enMessages.settings.appearance.theme.auto)).toBeInTheDocument(); }); - describe('when clicking a theme', () => { - it('should dispatch a switch-theme event', () => { - // Arrange - const listener = vi.fn(); - - // Act - const { component } = render(SettingsAppearance); - component.$on('switch-theme', listener); - const darkTheme = screen.getByLabelText(enMessages.settings.appearance.theme.dark); - darkTheme.click(); - const ev = new CustomEvent({ detail: 'dark' }); - - // Assert - expect(listener).toHaveBeenCalledOnce(); - expect(listener).toHaveBeenCalledWith(ev); - }); - }); - // TODO: Mark up proper label and input it.skip('should have a tab indent input', () => { // Arrange