display when the target has passed

This commit is contained in:
Julien Calixte
2023-03-18 14:17:09 +01:00
parent 60991e08da
commit 784e54bbf8
4 changed files with 25 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import { describe, it, expect, vi, afterEach, beforeEach } from "vitest"
import { hasPassed, timeUntil } from "./time-until"
import { hasTimePassed, timeUntil } from "./time-until"
const noTime = () => ({
days: 0,
@@ -57,9 +57,9 @@ describe("time until", () => {
describe("has passed", () => {
it("tells if the targed has passed", () => {
expect(hasPassed(noTime())).toBeTruthy()
expect(hasTimePassed(noTime())).toBeTruthy()
expect(
hasPassed({
hasTimePassed({
years: 0,
months: 0,
days: 0,