mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-23 14:02:48 +02:00
Clean some tests.
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
@@ -1,26 +1,11 @@
|
||||
const {test, assert} = require('scar');
|
||||
const format = require('../../../../src/_h5ai/public/js/lib/core/format');
|
||||
|
||||
test('format is object', () => {
|
||||
test('core.format', () => {
|
||||
assert.equal(typeof format, 'object');
|
||||
});
|
||||
|
||||
test('format has the right props', () => {
|
||||
assert.deepEqual(Object.keys(format), ['setDefaultMetric', 'formatSize', 'setDefaultDateFormat', 'formatDate']);
|
||||
});
|
||||
|
||||
test('format.setDefaultMetric is function', () => {
|
||||
assert.deepEqual(Object.keys(format).sort(), ['setDefaultMetric', 'formatSize', 'setDefaultDateFormat', 'formatDate'].sort());
|
||||
assert.equal(typeof format.setDefaultMetric, 'function');
|
||||
});
|
||||
|
||||
test('format.formatSize is function', () => {
|
||||
assert.equal(typeof format.formatSize, 'function');
|
||||
});
|
||||
|
||||
test('format.setDefaultDateFormat is function', () => {
|
||||
assert.equal(typeof format.setDefaultDateFormat, 'function');
|
||||
});
|
||||
|
||||
test('format.formatDate is function', () => {
|
||||
assert.equal(typeof format.formatDate, 'function');
|
||||
});
|
||||
|
Reference in New Issue
Block a user