QUNIT is not defined error

1,393 views
Skip to first unread message

Marius Matei

unread,
Mar 16, 2013, 3:23:29 PM3/16/13
to testa...@googlegroups.com
Hello,

When I'm trying to run testacular I get the followin error:

/usr/bin/node /usr/bin/testacular start ../tests/testacular.conf.js
INFO [testacular]: Testacular server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 25.0 (Linux)]: Connected on socket id QFzRk9wjIoDeZ5sPpFJ4
Chrome 25.0 (Linux) ERROR
Uncaught ReferenceError: QUNIT is not defined
at /var/www/html/zf2/tests/testacular.conf.js:11
Chrome 25.0 (Linux): Executed 0 of 0
e 25.0 (Linux): Executed 0 of 0 ERROR (0.114 secs / 0 secs)

And my configuration:

basePath = '';
files = [
  QUNIT,
  QUNIT_ADAPTER,
  'tests/*.js',
  '/var/www/html/zf2/tests/*.js'
];
reporters = ['progress'];
port = 9876;
runnerPort = 9100;
colors = true;
logLevel = LOG_INFO;
autoWatch = true;
browsers = ['Chrome'];
captureTimeout = 60000;
singleRun = false;

Why is saying that QUNIT is not defined. It is defined, I can see it in the source code of testacular...

Marius Matei

unread,
Mar 18, 2013, 5:43:48 AM3/18/13
to testa...@googlegroups.com, miroslaw....@gmail.com
In the test files I don't have any reference to QUnit. Do you mean that I have to modify in the config file QUNIT to Qunit? In that case, how should I chane QUNIT_ADAPTER (QUnit_adapater)?

duminică, 17 martie 2013, 14:36:44 UTC+2, miroslaw....@gmail.com a scris:
In test files you have to use QUnit instead of QUNIT.

Vojta Jína

unread,
Mar 20, 2013, 5:43:11 PM3/20/13
to karma...@googlegroups.com
-testacular
+karma-users

The problem is, your `files` pattern matches the config file itself. This file is not supposed to be loaded in the browser, there is no QUNIT constant in the browser.

So just add this to your config:
exclude = [
  'tests/testacular.conf.js'
];

I see this issue popping out very often, let's try to ignore the config file by default:

V.



--
You received this message because you are subscribed to the Google Groups "testacular" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testacular+...@googlegroups.com.
To post to this group, send email to testa...@googlegroups.com.
Visit this group at http://groups.google.com/group/testacular?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Marius Matei

unread,
Mar 21, 2013, 4:44:01 PM3/21/13
to karma...@googlegroups.com
That was the problem!!! Thank you Vojta. And yes, it would be great to ignore the config file by default. 

Vojta Jína

unread,
Mar 21, 2013, 7:12:46 PM3/21/13
to karma...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users?hl=en.
Reply all
Reply to author
Forward
0 new messages