Closed rhythmicdevil closed 11 years ago
Which version of should.js do you use, and show rows where do you require it in test file.
I assumed the latest version.
Section of package.json
"devDependencies" : {
"mocha" : "*",
"should" : "*"
},
Head of my test file:
require('should');
var fs = require('fs');
If you just did require('should');
there is no should
in scope. That is why it is undefined.
You need var should = require('should');
doh! Man I cant believe I let that get me by me. Thanks for the sanity check.
No problem, sometimes need fresh look.
I am not quite sure what I am doing wrong here. I am getting an error saying that "Should" has no method "exist".
I have a callback that returns an error object or a null.
I am testing it with this:
I get the following error:
Here is the full test for reference:
Here is the method being tested: