gitea源码

toast.test.ts 532B

1234567891011121314151617
  1. import {showInfoToast, showErrorToast, showWarningToast} from './toast.ts';
  2. test('showInfoToast', async () => {
  3. showInfoToast('success 😀', {duration: -1});
  4. expect(document.querySelector('.toastify')).toBeTruthy();
  5. });
  6. test('showWarningToast', async () => {
  7. showWarningToast('warning 😐', {duration: -1});
  8. expect(document.querySelector('.toastify')).toBeTruthy();
  9. });
  10. test('showErrorToast', async () => {
  11. showErrorToast('error 🙁', {duration: -1});
  12. expect(document.querySelector('.toastify')).toBeTruthy();
  13. });