Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making Karma a.k.a Testacular work [closed]

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

like image 567
iLemming Avatar asked May 06 '13 21:05

iLemming


People also ask

What does twisting your balls feel like?

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.

What is it called when your balls don't work?

Undescended testicles fail to drop into the scrotum before birth or in the first few months of life. The condition is also called cryptorchidism.

What happens if you open a testicle?

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.


1 Answers

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"];
like image 191
Simon Boudrias Avatar answered Oct 01 '22 00:10

Simon Boudrias