Hi,
I've been trying to use Jest to test React components written in CoffeeScript.
I used the provided CoffeeScript preprocessor example, just adding:
require('coffee-react/register');
so that it will accept CS + JSX syntax.
I then wrote my test:
jest.dontMock "#{__PATH__}/components/app.coffee"
describe 'App', ->
it 'is defined.', ->
App = require "#{__PATH__}/components/app.coffee"
expect(App).toBeDefined()
When I run jest, I get this error:
https://gist.github.com/kristoferjoseph/27c3e09eb1ec3443b5df
This error originates in myProject/node_modules/react/lib/ReactUpdates.js
var CallbackQueue = require("./CallbackQueue");
...
var asapCallbackQueue = CallbackQueue.getPooled();
While the function referred to in the backtrace is jest-cli/src/lib/moduleMocker.js.
So my impression here is that Jest is mocking CallbackQueue while it shouldn't.
What can I do in order to make my test run?
Thanks
pietro