gitea/web_src/js/modules/toast.test.ts

17 lines
532 B
TypeScript
Raw Normal View History

import {showInfoToast, showErrorToast, showWarningToast} from './toast.ts';
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();
});