2024-07-07 17:32:30 +02:00
|
|
|
import {showInfoToast, showErrorToast, showWarningToast} from './toast.ts';
|
2023-06-27 04:45:24 +02:00
|
|
|
|
|
|
|
test('showInfoToast', async () => {
|
2023-08-23 09:25:13 +02:00
|
|
|
showInfoToast('success 😀', {duration: -1});
|
2023-06-27 04:45:24 +02:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showWarningToast', async () => {
|
2023-08-23 09:25:13 +02:00
|
|
|
showWarningToast('warning 😐', {duration: -1});
|
2023-06-27 04:45:24 +02:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showErrorToast', async () => {
|
2023-08-23 09:25:13 +02:00
|
|
|
showErrorToast('error 🙁', {duration: -1});
|
2023-06-27 04:45:24 +02:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|