Skip to content

Instantly share code, notes, and snippets.

@gabrielbmoro
Created September 6, 2022 21:24
Show Gist options
  • Save gabrielbmoro/8197b0f335b5358cd8997e71d6933419 to your computer and use it in GitHub Desktop.
Save gabrielbmoro/8197b0f335b5358cd8997e71d6933419 to your computer and use it in GitHub Desktop.
An API Project - Gists Part 6
import { TimeHelper } from "util/TimeHelper"
describe("Time Helper", () => {
it("should get total minutes from 3h", () => {
const totalMinutes = TimeHelper.getTotalMinutes("3h")
expect(totalMinutes).toBe(180)
})
it("should get total minutes from 3h 15min", () => {
const totalMinutes = TimeHelper.getTotalMinutes("3h 15min")
expect(totalMinutes).toBe(195)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment