I want to learn Mocha/chai testing. But i'm never test before. i found this tutorial: http://ift.tt/1zXMNvQ
And when i reach "Run Test" and do "mocha" command for the first time. I get an error:
$ mocha
C:\Users\Tomasz\Desktop\Tests\test\test.js:1
(function (exports, require, module, __filename, __dirname) { test.js
^
ReferenceError: test is not defined
at Object.<anonymous> (C:\Users\Tomasz\Desktop\Tests\test\test.js:1:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at C:\Users\Tomasz\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:185:27
at Array.forEach (native)
at Mocha.loadFiles (C:\Users\Tomasz\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:182:14)
at Mocha.run (C:\Users\Tomasz\AppData\Roaming\npm\node_modules\mocha\lib\mocha.js:394:31)
at Object.<anonymous> (C:\Users\Tomasz\AppData\Roaming\npm\node_modules\mocha\bin\_mocha:394:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
What should i do?
Aucun commentaire:
Enregistrer un commentaire