mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			569 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			569 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import {test, expect} from 'vitest';
 | |
| 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();
 | |
| });
 |