Clean some tests.

This commit is contained in:
Lars Jung 2016-08-03 11:40:53 +02:00
parent f0bee58869
commit 834f3b5425
4 changed files with 73 additions and 101 deletions

View file

@ -1,18 +1,9 @@
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', 'pub']);
});
test('event.sub is function', () => {
test('core.event', () => {
assert.equal(typeof event, 'object', 'is object');
assert.deepEqual(Object.keys(event).sort(), ['sub', 'pub'].sort());
assert.equal(typeof event.sub, 'function');
});
test('event.pub is function', () => {
assert.equal(typeof event.pub, 'function');
});