mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Due to the pattern `**/specs/*.spec.js` defined in CircleCI, none of the frontend spec in the folders such as `specs/<domain-name>/getters.spec.js` were not executed in Circle CI. This PR fixes the issue, along with the following changes: - Use vitest instead of jest - Remove jest dependancies - Update tests to work with vitest --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
		
			
				
	
	
		
			10 lines
		
	
	
		
			292 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			292 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { dispatchWindowEvent } from '../CustomEventHelper';
 | 
						|
 | 
						|
describe('dispatchWindowEvent', () => {
 | 
						|
  it('dispatches correct event', () => {
 | 
						|
    window.dispatchEvent = vi.fn();
 | 
						|
    dispatchWindowEvent({ eventName: 'chatwoot:ready' });
 | 
						|
    expect(dispatchEvent).toHaveBeenCalled();
 | 
						|
  });
 | 
						|
});
 |