mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 03:57:08 -04:00
Switch file names from jade to pug.
This commit is contained in:
parent
3a2e61b163
commit
f0a9937dc6
8 changed files with 57 additions and 7 deletions
|
@ -2,6 +2,8 @@ const {test} = require('scar');
|
|||
const {pinHtml} = require('./util/pin');
|
||||
|
||||
require('./tests/premisses');
|
||||
require('./tests/unit/core/event');
|
||||
require('./tests/unit/core/format');
|
||||
|
||||
pinHtml();
|
||||
|
||||
|
|
22
test/tests/unit/core/event.js
Normal file
22
test/tests/unit/core/event.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
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');
|
||||
});
|
26
test/tests/unit/core/format.js
Normal file
26
test/tests/unit/core/format.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const {test, assert} = require('scar');
|
||||
const format = require('../../../../src/_h5ai/public/js/lib/core/format');
|
||||
|
||||
test('format is object', () => {
|
||||
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.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');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue