Archived
1
0

feat: add tests for node/heart.ts (#5122)

* refactor(heart): extract logic into heartbeatTimer fn

To make it easier to test, I extract heartbeatTimer into it's own
function.

* feat(testing): add tests for heart.ts

* fixup

* fixup!: remove unneeded heart call

* Update src/node/heart.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: use mockResolvedValue everywhere

* fixup!: add stat test for timestamp check

Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
Joe Previte
2022-04-26 11:35:40 -05:00
committed by GitHub
parent ed7bd2e65b
commit 18ff99693b
3 changed files with 119 additions and 12 deletions

View File

@ -1,5 +1,5 @@
import * as path from "path"
import { promises as fs } from "fs"
import * as path from "path"
import { clean } from "../utils/helpers"
import { describe, test, expect } from "./baseFixture"