mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: svelte 5 🎉 (#13738)
chore: svelte 5 Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
This commit is contained in:
parent
fed882a28a
commit
eadcbd52fb
61 changed files with 287 additions and 217 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import NumberRangeInput from '$lib/components/shared-components/number-range-input.svelte';
|
||||
import { act, render, type RenderResult } from '@testing-library/svelte';
|
||||
import { render, type RenderResult } from '@testing-library/svelte';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
|
||||
describe('NumberRangeInput component', () => {
|
||||
|
|
@ -8,13 +8,18 @@ describe('NumberRangeInput component', () => {
|
|||
let input: HTMLInputElement;
|
||||
|
||||
beforeEach(() => {
|
||||
sut = render(NumberRangeInput, { id: '', min: -90, max: 90, onInput: () => {} });
|
||||
sut = render(NumberRangeInput, {
|
||||
id: '',
|
||||
min: -90,
|
||||
max: 90,
|
||||
onInput: () => {},
|
||||
});
|
||||
input = sut.getByRole('spinbutton') as HTMLInputElement;
|
||||
});
|
||||
|
||||
it('updates value', async () => {
|
||||
expect(input.value).toBe('');
|
||||
await act(() => sut.component.$set({ value: 10 }));
|
||||
await sut.rerender({ value: 10 });
|
||||
expect(input.value).toBe('10');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue