mirror of
https://github.com/koel/koel
synced 2024-12-23 02:53:20 +00:00
15 lines
439 B
JavaScript
15 lines
439 B
JavaScript
require('chai').should();
|
|
|
|
import utils from '../../services/utils';
|
|
|
|
describe('services/utils', () => {
|
|
describe('#secondsToHis', () => {
|
|
it('correctly formats a duration to H:i:s', () => {
|
|
utils.secondsToHis(7547).should.equal('02:05:47');
|
|
});
|
|
|
|
it('ommits hours from short duration when formats to H:i:s', () => {
|
|
utils.secondsToHis(314).should.equal('05:14');
|
|
});
|
|
});
|
|
});
|