diff --git a/src/events.test.ts b/src/events.test.ts index abf2382..0287025 100644 --- a/src/events.test.ts +++ b/src/events.test.ts @@ -4,8 +4,8 @@ import { sum } from "lodash"; import * as dateFns from "date-fns"; import { clickhouseClient, knex } from "./databases"; -const oneHourAgo = dateFns.format( - dateFns.subHours(new Date(), 1), +const twoHourAgo = dateFns.format( + dateFns.subHours(new Date(), 2), "yyyy-MM-dd hh:mm:ss" ); @@ -15,7 +15,7 @@ describe("Events", () => { await clickhouseClient.query({ query: knex("events") .count("") - .where("created_at", ">", oneHourAgo) + .where("created_at", ">", twoHourAgo) .toString(), }) ).json()) as any; @@ -26,7 +26,7 @@ describe("Events", () => { await clickhouseClient.query({ query: knex("events") .count() - .where("created_at", ">", oneHourAgo) + .where("created_at", ">", twoHourAgo) .groupBy("geo_ip_country") .toString(), format: "JSON",