-
I'm getting "TypeError: Object # has no method 'calledWith'" when trying to use sinon-chai.
I'm running this with mocha
Here's the test:
var chai = require("chai"),
sinon = require("sinon"),
…
-
Controller:
```
...
myMethod: ->
Backbone.history.navigate('#/login')
...
```
Test:
```
...
it 'raises error of some reason', ->
@controller.myMethod()
```
Error in console:
```…
-
I have written it a number of ways and none of them are working. The request is going to the actual address. Is there an issue with my code or is this a bug?
```
server = sinon.fakeServer.create()
ur…
-
# Description
When implementing cyclical data structures (doubly-linked lists, tree structures with parent references), and then using assert.calledWith() on a spy/stub, an InternalError is thrown.
…
-
logicalparadox/chai-spies does some stuff to make
``` javascript
spy.should.have.been.called.once
```
work. Sinon-chai's equivalent is
``` javascript
spy.should.have.been.calledOnce
```
which is n…
-
Basically - this test (a simplified version of the original classes):
```
buster.testCase('breaking call stack when using circular references and spies', {
setUp: function() {
var A = f…
-
All of the tests pass except for Asserts.js. Same result with both master and tag 1.3.2:
$ node test/node/run.js
OK: SinonTest
OK: SinonWrapMethodTest
OK: WrappedMethodTest
OK: WrappedPrototypeMeth…
-
So correct me if I'm wrong, but the only way to access `args` is...
``` javascript
spy('dog');
// to get 'dog'
spy.args[0][0]
spy.getCall(0).args[0]
spy.lastCall.args[0] // firstCall etc.
```
Seem…
-
Why can't it serialize these options like it does the actual things it was called with? Are we misusing Sinon's `printf`?
-
I have a function that is passing an error object to it's callback:
```
function createUser (callback) {
callback(new Error('user exists'));
}
createUser(function (err) {
expect(err.message).to.…
ghost updated
12 years ago