* feat: set up new test for beat twice
* refactor: make Heart.beat() async
This allows us to properly await heart.beat() in our tests and remove
the HACK I added before.
* refactor: bind heart methods .beat and .alive
This allows the functions to maintain access to the Heart instance (or
`this`) even when they are passed to other functions. We do this because
we pass both `isActive` and `beat` to `heartbeatTimer`.
* feat(heart): add test to ensure no warnings called
* fixup!: revert setTimeout for heartbeatTimer
* fixup!: return promise in beat
* refactor: add timeout for race condition in heart test
* fixup!: set mtime to 0 and check for update
* fixup!: use utimes directly instead of file open
* fixup!: remove import
* 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>