mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(web): use development lang for tests (#10025)
This commit is contained in:
parent
3e118793de
commit
d5f3d98dfc
6 changed files with 7 additions and 24 deletions
|
|
@ -1,16 +1,11 @@
|
|||
import '@testing-library/jest-dom';
|
||||
import { cleanup, render, type RenderResult } from '@testing-library/svelte';
|
||||
import { init } from 'svelte-i18n';
|
||||
import { NotificationType } from '../notification';
|
||||
import NotificationCard from '../notification-card.svelte';
|
||||
|
||||
describe('NotificationCard component', () => {
|
||||
let sut: RenderResult<NotificationCard>;
|
||||
|
||||
beforeAll(async () => {
|
||||
await init({ fallbackLocale: 'en-US' });
|
||||
});
|
||||
|
||||
it('disposes timeout if already removed from the DOM', () => {
|
||||
vi.spyOn(window, 'clearTimeout');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import '@testing-library/jest-dom';
|
||||
import { render, waitFor, type RenderResult } from '@testing-library/svelte';
|
||||
import { init } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import { NotificationType, notificationController } from '../notification';
|
||||
import NotificationList from '../notification-list.svelte';
|
||||
|
|
@ -12,8 +11,7 @@ function _getNotificationListElement(sut: RenderResult<NotificationList>): HTMLA
|
|||
describe('NotificationList component', () => {
|
||||
const sut: RenderResult<NotificationList> = render(NotificationList);
|
||||
|
||||
beforeAll(async () => {
|
||||
await init({ fallbackLocale: 'en-US' });
|
||||
beforeAll(() => {
|
||||
// https://testing-library.com/docs/svelte-testing-library/faq#why-arent-transition-events-running
|
||||
vi.stubGlobal('requestAnimationFrame', (fn: FrameRequestCallback) => {
|
||||
setTimeout(() => fn(Date.now()), 16);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue