UNPKG

nexshop-web-contents

Version:

Nexshop Web Contents Project

15 lines (13 loc) 520 B
import React from 'react'; import {expect} from 'chai'; import {formatSeconds, formatSecondsToMinutes} from "../../src/helpers/time-helper"; describe('Time Helper Spec', () => { describe('formatSeconds', () => { it('formats seconds into given format mm:ss', () => { expect(formatSeconds(120, 'mm:ss')).to.equal('02:00'); }); it('formats seconds into given format hh:mm:ss', () => { expect(formatSeconds(120, 'hh:mm:ss')).to.equal('00:02:00'); }); }); });