formatSeconds.test.ts 418 B

123456789101112
  1. import { describe, expect, it } from 'vitest'
  2. import formatSeconds from './formatSeconds.ts'
  3. describe('formatSeconds', () => {
  4. it("should return a value of '0:43' when an argument of 43 seconds is supplied", () => {
  5. expect(formatSeconds(43)).toEqual('0:43')
  6. })
  7. it("should return a value of '1:43' when an argument of 103 seconds is supplied", () => {
  8. expect(formatSeconds(103)).toEqual('1:43')
  9. })
  10. })