test: update tests
I don't use events anymore but update a Svelte store. Not sure how to test it. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
parent
c86902b2f8
commit
564d9bb6a7
1 changed files with 0 additions and 18 deletions
|
@ -48,24 +48,6 @@ describe('SettingsAppearance.svelte', () => {
|
||||||
expect(screen.getByLabelText(enMessages.settings.appearance.theme.auto)).toBeInTheDocument();
|
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
|
// TODO: Mark up proper label and input
|
||||||
it.skip('should have a tab indent input', () => {
|
it.skip('should have a tab indent input', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
Loading…
Reference in a new issue