Skip to content

Instantly share code, notes, and snippets.

@umegaya
Created December 20, 2018 07:18
Show Gist options
  • Save umegaya/ddca5b754279eaa57308ded159819b51 to your computer and use it in GitHub Desktop.
Save umegaya/ddca5b754279eaa57308ded159819b51 to your computer and use it in GitHub Desktop.
jestを使うとsetIntervalがnodeのやつじゃなくなる!
by default, jest uses jsdom to provide low level APIs like setInterval,
https://jestjs.io/docs/en/configuration#testenvironment-string
setting ```"testEnvironment": "node"``` in "jest" config of package.json solves problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment