I'm quite new to jscript tdd and got a problem, hope someone can show me what I'm doing worng. Running the Tests in a browser (via HTML File) everything works fine. running them through node and karma i got the following exception
I want to use Mocha and Chai within karma in node.js host. I installed via npm install [...] --save-dev
mocha and karma-mocha
I've a testlibrary like this
suite('first suite', function () { test('SuccessTest', function () { expect(1).to.equal(1); }); test('FailTest', function () { expect(1).to.equal(2); }); });
in node i used karma init to create the config file in which i set frameworks to
frameworks: ['mocha','chai'],
now when I run karma it got this error
"suite is not defined"
I assumed that declaring mocha and chai as frameworks this should have worked?
I also installed in node the karma-mocha and karma-chai plugins.
What do I wrong and what do I have to do ?
where the whole karma config file
I also tried to add mocha.js and chai.js to the file load list but this didn't help
files: [ 'mocha.js', 'chai.js', 'tests.js' ],
When I change tests to jasmine it works.