mojito icon indicating copy to clipboard operation
mojito copied to clipboard

mojito test crashes when require() is used

Open jithine opened this issue 11 years ago • 2 comments

I have a model which uses require() var fs = require('fs');

When I try to unit test this model, the test crashes and throws the following the error.

/home/y/lib/node_modules/mojito-cli/node_modules/mojito-cli-test/node_modules/yuitest/lib/yuitest-node.js:773
            throw new YUITest.ComparisonFailure(YUITest.Assert._formatMessage(
                  ^
ComparisonFailure: Value should be true.
ss [jithine@firedesire g11n_self_serve]$ echo $?
8

If I remove the require() statement the test execution will continue to it's logical end.

jithine avatar Jan 24 '14 02:01 jithine

Are you running your test in a browser or in node?

drewfish avatar Jan 27 '14 17:01 drewfish

It's on node. It's. Unit test ran via mojito test— Sent from Mailbox for iPhone

On Mon, Jan 27, 2014 at 10:18 AM, Drew Folta [email protected] wrote:

Are you running your test in a browser or in node?

Reply to this email directly or view it on GitHub: https://github.com/yahoo/mojito/issues/1314#issuecomment-33400601

jithine avatar Jan 27 '14 21:01 jithine