18 lines
587 B
JavaScript
18 lines
587 B
JavaScript
import {test, expect} from 'vitest';
|
|
import {showInfoToast, showErrorToast, showWarningToast} from './toast.js';
|
|
|
|
test('showInfoToast', async () => {
|
|
await showInfoToast('success π', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|
|
|
|
test('showWarningToast', async () => {
|
|
await showWarningToast('warning π', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|
|
|
|
test('showErrorToast', async () => {
|
|
await showErrorToast('error π', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|