I wanna use Karma (previously known as Testacular) to run some jasmine tests. So I've installed node.js, then I run:
npm -g install karma
I even installed jasmine
npm -g jasmine-node
then I used karma init
it created 'karma.conf.js' where "files" section contains this
files = [
JASMINE,
JASMINE_ADAPTER,
'*.js',
];
and I created a small test file
describe("A suite", function() {
return it("spec with an expectation", function() {
return expect(true).toBe(true);
});
});
now I'm trying to run it karma start
it throws me an error: Uncaught ReferenceError: JASMINE is not defined
, if I remove the line with JASMINE
, run again - now it doesn't say anything about jasmine, but throws: describe is not defined
So what am I doing wrong?
btw. putting module('someModule')
in test file doesn't help (module is not defined
error)
upd: I'm on Windows
Signs and symptoms of testicular torsion include: Sudden, severe pain in the scrotum — the loose bag of skin under your penis that contains the testicles. Swelling of the scrotum. Abdominal pain.
Undescended testicles fail to drop into the scrotum before birth or in the first few months of life. The condition is also called cryptorchidism.
Testicular rupture, like testicular torsion and other serious injuries to the testicles, causes extreme pain, swelling in the scrotum, nausea, and vomiting. Surgery is needed to fix the ruptured testicle.
in fact I'm pretty sure using global variables (e.g. JASMINE
) been deprecated in the lastest Karma version - but it's not documented.
It should have been replaced by the frameworks
options, so you'd only need:
frameworks = ["jasmine"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With