I want to integrate my Jest unit tests to TFS CI, so that during build it shows the Jest unit Test results in Build output of TFS. I used a extension Chutzpah. Below are references for it : https://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe https://blogs.msdn.microsoft.com/visualstudioalm/2012/03/01/visual-studio-11-beta-unit-testing-plugins-list/
I followed https://blogs.msdn.microsoft.com/matt-harrington/2014/10/27/javascript-unit-testing-using-the-chutzpah-test-runner-in-visual-studio/ to set up chutzpah but my test are failing to discover Jest reference.
We are using Jest preprocessor as Babel-preset-jest, babel-preset-es2015, babel-preset-es2015. I tried adding those reference to test.js file. But still it failes with message Error: ReferenceError: Can't find variable: jest.
Can someone help with exactly what references needs to be added for React js application to discover Jest unit tests in chutzpah. Or any reference to any react js application where such scenario is done.
Currently when executing Jest test using NPM Test it runs correctly, but I want it to be discovered in VS test explorer
This is because Chutzpah doesn't support Jest. Based on the documentation it currently only supports QUnit, Jasmine and Mocha.
I'm not familiar with Chutzpah but you'll need to implement a new framework definition that will include Jest in the test execution environment.