Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rburgst/fastify-jest-timers
bug repo showing a fastify problem with jest fakeTimers
https://github.com/rburgst/fastify-jest-timers
Last synced: 2 days ago
JSON representation
bug repo showing a fastify problem with jest fakeTimers
- Host: GitHub
- URL: https://github.com/rburgst/fastify-jest-timers
- Owner: rburgst
- Created: 2021-11-09T11:09:08.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-20T18:02:23.000Z (about 3 years ago)
- Last Synced: 2024-11-08T17:53:07.540Z (about 2 months ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fastify Hangs with Jest Sample repo
Sample repo demostrating a problem with fastify and using `jest.useFakeTimers` causing a hang.
To replicate:
* `npm install`
* `npm run test`=> test hangs and fails with timeout.
Comment out
```javascript
// test/routes/root.test.js// jest
// .useFakeTimers("modern")
// .setSystemTime(new Date("2020-02-08T20:10:21.520Z"));
```to make it work.
See https://github.com/facebook/jest/issues/12056