refactor(heart): bind class methods and make beat async (#5142)
* 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
J
Joe Previte committed
88e971c609d112693d3c81851e31a2c44e1d27e2
Parent: 7027ec7
Committed by GitHub <noreply@github.com>
on 5/4/2022, 11:05:48 PM