mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
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();
|
||
|
});
|