-
I found a scenario where calledWith and calledWithExactly don't seem to work correctly if a spy receives an object as an argument
_and_ that object has the same number of properties as expected
_and_ …
-
Hi Guys,
Just brainstorming a bit here.
So after having developed a large and highly async SPA I feel the current stack of HTML5 + CujoJs is really productive. Howeve; I have found unit testing my mo…
-
Then you would just "unstub" the `.load` function for the one (or very few) cases you want to test loading the external library.
In all the other cases you wouldn't have to worry about it, so it's no…
-
Based on the existing [blueprint package.json](https://github.com/stefanpenner/ember-cli/blob/master/blueprint/package.json), the /api route does not activate the express route.
-
I much prefer AAA to:
mockMessageRepository.expects("post").calledWith(message);
scope.publish();
mockMessageRepository.verify();
AAA would look like:
//Arrange (nothing for t…
-
[sinon-chai](https://yooxmysizes.yoox.net/it/Checkout/CheckEmail) makes assertion easier. but currently, the _chai_ object is not exposed, thus, users cannot call `chai.use` to load `sinon-chai`.
sug…
-
looks like the issue is in the deepEqual method:
``` javascript
if (typeof a != "object" || typeof b != "object") {
return a === b;
}
```
`typeof NaN` returns `"number"`, but comparing `NaN` to it…
-
I've written a simple unit test using `mocha` as follows (does nothing right now other than assert true but I wanted to be sure I knew how this all works)
```
var Sails = require('sails'),
assert…
-
I was recently caught out on this when writing a test case:
```
var expectedReport = {};
var someOtherObject = {};
this._someService.generateReport.returns(expectedReport);
this._execCmd();
ok(this.…
-
Stub objects work exactly as spy objects according to SinonJS' documentation, but sinon-chai matchers don't work on stubs, only spies.
The following doesn't work:
``` javascript
it('should call Some…