javascript - how to properly include source files for jasmine-node test runner -


i'm using jasmine spec library along jasmine-node runner node.js. right way run tests (the command in cli) both includes source files , spec files?

i've got lib directory sources want include , unit.spec.js includes tests. when following, error:

tomasz.ducin@wawlt548 mingw64 ~/development/json-schema-faker/json-schema-faker (master) $ ./node_modules/.bin/jasmine-node lib unit.spec.js --nostacktrace --captureexceptions f.  failures:    1) suite contains spec expectation     message:       referenceerror: booleangenerator not defined  finished in 0.007 seconds 2 tests, 1 failures, 0 skipped 

the booleangenerator defined in lib directory - somehow doesn't loaded... dunno why.

is commonjs require function right way? paths pass in cli separate during jasmine runtime?

the directory pass in via command prompt jasmine-node folder specs kept.

so yes, need require additonal functions have defined in lib directory in spec files.

there's article here traditional calculator project built , can see how calculator functions pulled in require.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -