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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -