-
-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
queueMarkAsRead: Adapt to use Lolex in tests.
Simplify tests significantly by using Jest. In addition to changes in the tests proper, this also sets the internal variable `lastSentTime` to an initial value of `-Infinity` rather than `0`: Lolex's fake clock is initially set to a time of `0`, which badly confuses the original code. (An alternative solution would be to bump Lolex's initial time to some value greater than 0, but this seems more clearly a hack.)
- Loading branch information
1 parent
e6e6054
commit 744a98b
Showing
2 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters