mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
test: common: util: coverage
This commit is contained in:
parent
b7bb363aa8
commit
fec5538f01
1 changed files with 16 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ import {
|
||||||
getRegExp,
|
getRegExp,
|
||||||
escapeRegExp,
|
escapeRegExp,
|
||||||
getExt,
|
getExt,
|
||||||
|
time,
|
||||||
|
timeEnd,
|
||||||
} from '#common/util';
|
} from '#common/util';
|
||||||
|
|
||||||
test('getExt: no extension', (t) => {
|
test('getExt: no extension', (t) => {
|
||||||
|
|
@ -120,3 +122,17 @@ test('util: escapeRegExp', (t) => {
|
||||||
t.equal(result, expected);
|
t.equal(result, expected);
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('util: time', (t) => {
|
||||||
|
const [error] = tryCatch(time, 'test');
|
||||||
|
|
||||||
|
t.notOk(error, 'should not throw');
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('util: timeEnd', (t) => {
|
||||||
|
const [error] = tryCatch(timeEnd, 'test');
|
||||||
|
|
||||||
|
t.notOk(error, 'should not throw');
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue