gitea-local/web_src/js/modules/toast.test.js
2024-08-07 15:56:31 +08:00

17 lines
532 B
JavaScript
Executable File

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