TeamCity & mocha-phantomjs: ReferenceError: Can't find variable: require

176 views Asked by At

I need to run JS tests on CI server. Testing framework is mocha. I've found mocha-phantomjs but it gives me output like this:

ReferenceError: Can't find variable: require at c:/w1/-----/---/Tests/RestApiTests/BasicTests.js:1

When I changed reporter to 'teamcity' the output was like this:

The Teamcity reporter was moved to a package named mocha-teamcity-reporter (https://npmjs.org/package/mocha-teamcity-reporter). Unable to open file 'teamcity'

And no instructions the way I can use it.

I have two *.js files with tests, which has to be tested on CI server, with report of amount of tests passed/failed

Pretty new to JS, as well as to testing it, but I need to configure this tests in TeamCity, to have results on failed and passed tests.

0

There are 0 answers