mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-23 11:37:03 -04:00
22 lines
583 B
JavaScript
22 lines
583 B
JavaScript
const {test, assert} = require('scar');
|
|
const event = require('../../../../src/_h5ai/public/js/lib/core/event');
|
|
|
|
test('event is object', () => {
|
|
assert.equal(typeof event, 'object');
|
|
});
|
|
|
|
test('event has the right props', () => {
|
|
assert.deepEqual(Object.keys(event), ['sub', 'unsub', 'pub']);
|
|
});
|
|
|
|
test('event.sub is function', () => {
|
|
assert.equal(typeof event.sub, 'function');
|
|
});
|
|
|
|
test('event.unsub is function', () => {
|
|
assert.equal(typeof event.unsub, 'function');
|
|
});
|
|
|
|
test('event.pub is function', () => {
|
|
assert.equal(typeof event.pub, 'function');
|
|
});
|