mirror of
https://github.com/lrsjng/h5ai.git
synced 2026-02-05 14:09:24 +01:00
27 lines
821 B
JavaScript
27 lines
821 B
JavaScript
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');
|
|
});
|