I have a project containing tests that I run using Mocha from the command line. I installed a test script in my packages.json that looks like this:
"test": "mocha ./**/*.spec.js --reporter dot --require jsdom-global/register"
I have a simple task configured in Visual Studio Team Services that simply runs the npm test command, it runs Mocha in the console and continues / does not build depending on whether the tests pass.
What I would like to do is get the results of my tests by filling out the "tests" tab in the assembly definition after it starts. Just like I can get this tab if I run tests in C # code.
I tried using Chutzpah for this, but it is too complex and seems to require me to jump over all kinds of hoops, which meant changing my tests and writing long configuration files. I already have a ton of tests, and I really don't want to do this. When he finally discovered any of my tests, he complained about require and other things related to Node modules.
What I ask is really possible? Is there an easy way to achieve this compatible with running my tests in Node?
source share