javascript - How to configure mocha when external dependencies are involved -


my folder structure is

-assets      - apps         - login             -adminlogin.js     - data         - trackerdb.js -specs      - apps         -login             -adminlogin_spec.js 

specrunner.js

i have specrunner.js file have added test initialization in package.json in root

"test": "node assets/spec_runner.js" specrunner includes test needs run.

the first line of adminlogin.js define("trackerdb"),function(tracker){ //complete code} when writing test case source file , running it, throws error "cannot find trackerdb.js"

so question need pass every js file relative path .. if external module jquery, underscore etc..

do have other way can directly configured mocha can find every path.


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -