mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #3802 - Improve folder structure for nuxt configurations
This commit is contained in:
parent
851950270b
commit
f5fe822afb
563 changed files with 1703 additions and 1095 deletions
24
components/lib/utils/test/EventBus.spec.js
Normal file
24
components/lib/utils/test/EventBus.spec.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import EventBus from '../EventBus';
|
||||
|
||||
describe('EventBus', () => {
|
||||
it('When eventbus is on, callback should be emitted', () => {
|
||||
const eventBus = new EventBus();
|
||||
const callback = vi.fn();
|
||||
|
||||
eventBus.on('test', callback);
|
||||
eventBus.emit('test');
|
||||
|
||||
expect(callback).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('When eventbus is off, callback should be emitted', () => {
|
||||
const eventBus = new EventBus();
|
||||
const callback = vi.fn();
|
||||
|
||||
eventBus.on('test', callback);
|
||||
eventBus.off('test', callback);
|
||||
eventBus.emit('test');
|
||||
|
||||
expect(callback).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue