2023-06-27 08:15:24 +05:30
|
|
|
import {test, expect} from 'vitest';
|
|
|
|
import {showInfoToast, showErrorToast, showWarningToast} from './toast.js';
|
|
|
|
|
|
|
|
test('showInfoToast', async () => {
|
2023-08-23 12:55:13 +05:30
|
|
|
showInfoToast('success 😀', {duration: -1});
|
2023-06-27 08:15:24 +05:30
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showWarningToast', async () => {
|
2023-08-23 12:55:13 +05:30
|
|
|
showWarningToast('warning 😐', {duration: -1});
|
2023-06-27 08:15:24 +05:30
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('showErrorToast', async () => {
|
2023-08-23 12:55:13 +05:30
|
|
|
showErrorToast('error 🙁', {duration: -1});
|
2023-06-27 08:15:24 +05:30
|
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
|
|
});
|