mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-01 08:47:40 -04:00
ee27b94b2c
Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing the noise in test files.
17 lines
532 B
JavaScript
17 lines
532 B
JavaScript
import {showInfoToast, showErrorToast, showWarningToast} from './toast.js';
|
|
|
|
test('showInfoToast', async () => {
|
|
showInfoToast('success 😀', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|
|
|
|
test('showWarningToast', async () => {
|
|
showWarningToast('warning 😐', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|
|
|
|
test('showErrorToast', async () => {
|
|
showErrorToast('error 🙁', {duration: -1});
|
|
expect(document.querySelector('.toastify')).toBeTruthy();
|
|
});
|