Skip to content

Commit 1fc5f83

Browse files
author
Joe Previte
committed
feat: add tests for node/heart.ts
1 parent c35bf13 commit 1fc5f83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/node/heart.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ export class Heart {
2727

2828
logger.trace("heartbeat")
2929
fs.writeFile(this.heartbeatPath, "").catch((error) => {
30-
logger.warn(error.message)
30+
logger.warn(error.message) // TODO@jsjoeio - write code for this line
3131
})
3232
this.lastHeartbeat = Date.now()
3333
if (typeof this.heartbeatTimer !== "undefined") {
34-
clearTimeout(this.heartbeatTimer)
34+
clearTimeout(this.heartbeatTimer) // TODO@jsjoeio - write code for this line
3535
}
3636
this.heartbeatTimer = setTimeout(() => {
37-
this.isActive()
37+
this.isActive() // TODO@jsjoeio - start write code for here.
3838
.then((active) => {
3939
if (active) {
4040
this.beat()
4141
}
4242
})
4343
.catch((error) => {
44-
logger.warn(error.message)
44+
logger.warn(error.message) // TODO@jsjoeio - end.
4545
})
4646
}, this.heartbeatInterval)
4747
}

test/unit/node/heart.test.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)