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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -