test: common: util: coverage

This commit is contained in:
coderaiser 2026-07-16 12:26:33 +00:00
parent b7bb363aa8
commit fec5538f01

View file

@ -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();
});