1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/web_src/js/modules/toast.test.js

17 lines
532 B
JavaScript
Raw Normal View History

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();
});