Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Setting Up Istanbul

Balázs Földesi
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Balázs Földesi
Full Stack JavaScript Techdegree Graduate 16,750 Points

No coverage information was collected

I've downloaded the project files, did the npm install, and install istanbul. After the "./node_modules/.bin/instanbul cover ./node_modules/.bin/_mocha" line the terminal says: "No coverage information was collected, exit without writing coverage information" ... "SyntaxError: missing ) after argument list".

After adding the test:coverage script in the package.json file, and runned it, it says: "No coverage information was collected, exit without writing coverage information C:\Users\balaz\babun\cygwin\home\balaz\apps\test\calculator.js\node_modules.bin_mocha.CMD:1 (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0\node.exe" ( ...SyntaxError: Invalid or unexpected token..."

Anybody have idea what's wrong?

I keep getting the same error.. And not just for the calculator project but other projects I'm trying to run outside of the Treehouse environment. If I come across a solution I'll drop you a line!

1 Answer

I fixed the issue here with : https://stackoverflow.com/questions/32304980/unexpected-token-illegal-istanbul-test-mocha

"scripts": {
    "test": "mocha",
    "test:coverage":"istanbul cover node_modules/mocha/bin/_mocha"
  },