mirror of
https://github.com/go-gitea/gitea
synced 2024-11-09 11:44:27 +00: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();
|
|
});
|