Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: MOCHA is not defined #596

Closed
senseysensor opened this issue Jun 25, 2013 · 1 comment · May be fixed by Chadzzz1/karma#8, ilw4r/karma#11, Chadzzz1/karma#9 or Chadzzz1/karma#13
Closed

ReferenceError: MOCHA is not defined #596

senseysensor opened this issue Jun 25, 2013 · 1 comment · May be fixed by Chadzzz1/karma#8, ilw4r/karma#11, Chadzzz1/karma#9 or Chadzzz1/karma#13

Comments

@senseysensor
Copy link

After upgrading from karma 0.8 to canary version (0.9.3) using command sudo npm install -g karma@0.9 I have following error:
ERROR [config]: Invalid config file!
[ReferenceError: MOCHA is not defined]
ReferenceError: MOCHA is not defined
And then traceback.

What am I doing wrong? everything worked great with 0.8 version. I cannot find any information about the issue in the google.
I also heard a lot of things have been changed in 0.9x versions - where can I find information about that?
thanks in advance.

@vojtajina
Copy link
Contributor

Weird, it should give you a warning with ana advice, how to migrate. Can you try the latest canary (0.9.4) ? That should even work and give a warning, how to update the config file.

The config file syntax has changed. Once this is in stable release, the docs will be updated as well.

This is the syntax format you need:

module.exports = function(config) {
  config.set({
    frameworks: ['mocha'],
    files: [...],
    // ....
  });
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment