2023-06-27 02:45:24 +00:00
|
|
|
import {showInfoToast, showErrorToast, showWarningToast} from './toast.js';
|
|
|
|
|
|
|
|
test('showInfoToast', async () => {
|
2023-08-23 07:25:13 +00:00
|
|
|
showInfoToast('success π', {duration: -1});
|
2023-06-27 02:45:24 +00:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showWarningToast', async () => {
|
2023-08-23 07:25:13 +00:00
|
|
|
showWarningToast('warning π', {duration: -1});
|
2023-06-27 02:45:24 +00:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showErrorToast', async () => {
|
2023-08-23 07:25:13 +00:00
|
|
|
showErrorToast('error π', {duration: -1});
|
2023-06-27 02:45:24 +00:00
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|