-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: timer.unref is not a function #1909
Comments
So far it seems my issue is related to the fact that the console.log(setInterval.toString()) // inside the test |
The solution is to use http://facebook.github.io/jest/docs/configuration.html#testenvironment-string |
…t warnings (#95) * update to webpack 4 * use node as test environment jestjs/jest#1909 * fix remaining eslint problems
I got here by googling Setting Just leaving this here for anyone else that might need it. |
I'm also getting the Changing the Does anyone have any thoughts when you are trying to test React elements that need the jsdom environment for things like localStorage? |
@NathTech I'm getting the same issue, trying to write some integration tests wish Jest + JSDOM + React + Emulators but I'm blocked testing anything that uses firestore |
Have the same warning when using Jest to test React + Firestore. |
Yes! someone else! Please comment on the issues I raised in other repositories for visibility :) Here firebase/firebase-js-sdk#4552 and facebook/create-react-app#10626. Found any workarounds @naourass? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Bug, or just support request (sorry!)
What is the current behavior?
Lots of errors around
TypeError: timer.unref is not a function
when trying to run jest on my mocha tests.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can
npm install
andnpm test
.Yeah just do this
test.js
And then run it with jest somehow.
What is the expected behavior?
Not
FAIL
.It works fine when you run the code directly with node. Also here is the API for it:
https://nodejs.org/api/timers.html#timers_timeout_unref
Run Jest again with
--debug
and provide the full configuration it prints. Please mention your node and npm version and operating system.Debug has basically the same output as above:
The text was updated successfully, but these errors were encountered: