code.gitea.io/gitea@v1.22.3/web_src/js/modules/toast.test.js (about)

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