diff --git a/resources/assets/tests/scripts/notification.test.ts b/resources/assets/tests/scripts/notification.test.ts deleted file mode 100644 index 7dfcc220..00000000 --- a/resources/assets/tests/scripts/notification.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { get } from '@/scripts/net' -import { showModal } from '@/scripts/notify' -import { flushPromises } from '../utils' -import handler from '@/scripts/notification' - -jest.mock('@/scripts/net') -jest.mock('@/scripts/notify') - -test('read notification', async () => { - document.body.innerHTML = ` -
- ` - document.querySelector('.notifications-list')!.addEventListener('click', handler) - get.mockResolvedValue({ - title: 'title', - content: 'content', - time: 'time', - }) - - document.querySelector('a')!.click() - await flushPromises() - expect(get).toBeCalledWith('/user/notifications/1') - expect(showModal).toBeCalledWith({ - mode: 'alert', - title: 'title', - dangerousHTML: 'content