ember.js - Using EmberJS, Mocha and Karma -
i using mocha , karma writing , running test cases emberjs client. bundle test cases single file , using minispade.js solve dependency issues
the problem facing that, able run test cases, if test case fails, shows description of test case , not provide info file has case written.
is there way show file name also, if test case fails?
@stevekane,
are invoking client's code ( ie. minispade wrapped files) in test-case module using minispade.require()?
here how have used minispade karma:
- i bundle client's code & test cases separately single file. example: client.js & test_cases.js.
i have separate file(say test.js)where declare global used running test cases . in file, invoke client's code , test- cases using minispade.require().here how test.js file look:
mocha.setup({ ui: 'bdd', ignoreleaks: true }); var assert = chai.assert; ........ window.minispade.require('app/main'); // client's code window.minispade.require("spec/main"); // test cases
here main.js refers file have included client & test cases modules using minspade.require().
in karma configuration file, include test cases code under files. configuration file have following lines:
files = [ {pattern : 'test_cases.js', included: true}, {pattern : test.js', included: true} ].
4 run karma run command.
hope have made myself clear. try , let me know if stuck.
Comments
Post a Comment