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
[Question] Is Jest a good fit for backend unit tests? #1368
Comments
What kind of backend testing are you trying to do? Jest itself uses Jest for tests and loads of libraries use Jest for testing. Can you provide a repository on github that I can use to Two things I recommend: try setting |
Thanks for the quick reply @cpojer! Glad to hear Jest can be used with Node! I was thinking it would, since it's essentially a testing library and the API should just work, but felt the need to ask it especially since there's almost no resources online showing it being used with Node backends and mostly with react (or my Google-Fu just wasn't good enough). I was already mocking my Cheers! |
Yes, the default environment ( |
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. |
I've been loving Jest so far testing React components.
I've used/been using Mocha/Jasmine for testing node backends though, and I just wanted to ask if it's possible (and recommended) to use Jest for backend testing, since I could not find any indication of it in the docs (React, React-Native, Async, Webpack, i.e. no
Node
)I just tried using it, and unfortunately I hit an instant roadblock.
brcypt
triggers a[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()
warning and the test fails due to a runtime error (TypeError: Path must be a string. Received undefined
)Is it possible to use Jest for backend testing right now, or is it not part of the project's scope and something like Jasmine be a better fit?
The text was updated successfully, but these errors were encountered: