Skip to content

Commit

Permalink
fix: db test (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Jun 27, 2023
1 parent 6f56824 commit 0b05713
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/db_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function genNewUser(): User {

Deno.test("[db] newItemProps()", () => {
const itemProps = newItemProps();
assertAlmostEquals(itemProps.createdAt.getTime(), Date.now());
assertAlmostEquals(itemProps.createdAt.getTime(), Date.now(), 1e-6);
assertEquals(typeof itemProps.id, "string");
assertEquals(itemProps.score, 0);
});
Expand Down Expand Up @@ -168,7 +168,7 @@ Deno.test("[db] visit", async () => {

Deno.test("[db] newCommentProps()", () => {
const commentProps = newCommentProps();
assertAlmostEquals(commentProps.createdAt.getTime(), Date.now());
assertAlmostEquals(commentProps.createdAt.getTime(), Date.now(), 1e-6);
assertEquals(typeof commentProps.id, "string");
});

Expand Down

0 comments on commit 0b05713

Please sign in to comment.