aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/modules/toast.test.ts
blob: b29e9a32bd42044882a492df530d509cfd26184f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {showInfoToast, showErrorToast, showWarningToast} from './toast.ts';

test('showInfoToast', async () => {
  showInfoToast('success 😀', {duration: -1});
  expect(document.querySelector('.toastify')).toBeTruthy();
});

test('showWarningToast', async () => {
  showWarningToast('warning 😐', {duration: -1});
  expect(document.querySelector('.toastify')).toBeTruthy();
});

test('showErrorToast', async () => {
  showErrorToast('error 🙁', {duration: -1});
  expect(document.querySelector('.toastify')).toBeTruthy();
});