-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Mocking Backbone throws an error #59
Comments
+1 |
Adding backbone path to
{
"scripts": {
"test": "jest"
},
"jest": {
"unmockedModulePathPatterns": ["./node_modules/backbone"]
},
"dependencies": {
"backbone": "^1.1.2",
"jquery": "^2.1.1",
"requirejs": "^2.1.14",
"underscore": "^1.6.0"
}
} |
+1 |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
@facebook-github-bot-4 What is the condition of this issue? |
I'd recommend not mocking Backbone. It probably uses some meta programming that we can't mock properly. |
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. |
Here's a very simple example showing how requiring Backbone will cause Jest to fail.
https://github.com/maspwr/backbone-jest/tree/master
The text was updated successfully, but these errors were encountered: