-
I have a function where the first argument is an identifier and the second argument is an options object. Usually I don't care about the options object, so I frequently load my default data using `exp…
-
Thanks for creating such a handy little library!
The output of `calledWith` with seems to be a bit broken when using the `contains` matcher. Here's what I get when using `testdouble.verify`:
```…
-
*Context:* I use `jest-when` for mocking API responses, typically through a function like `makeRequest(method, url, requestBody)`. Often we don't care about the request body, and often we want to use …
-
See https://github.com/aws/aws-encryption-sdk-dafny/pull/573 for manual code changes and explanation.
-
```js
// BAD
sinon.assert.calledOnce(stub);
sinon.assert.calledWith(stub, params);
// GOOD
sinon.assert.calledWith(stub, params);
sinon.assert.calledOnce(stub);
```
We should consider `sin…
-
Many functions expect an object as input parameter. `calledWith` relies on strict equality. `expect.objectContaining` is a partial match.
Is there a way to perform a deep object comparison? Am I mi…
-
I'm having trouble making sinon-chrome stubs work with `sinon.match`.
I use webpack, karma, mocha and sinon-chai. The spec below may reproduce the error.
It looks like sinon-chrome's stub doesn'…
crimx updated
6 years ago
-
Currently when a test fails it provides output the following way:
e.g.
``` javascript
const fooObject = {
foo: 'foo'
};
const barObject = {
bar: 'bar'
};
const stub = sinon.stub();
…
-
(node:16003) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) at handledRejection
In my test, I mock rejected value without `calledWith`, then I get th…
-
```typescript
it('able to create user with prisma', async () => {
const db: DeepMockProxy = mockDeep()
// I do assign mock value for extension but it doesn't seem to return user
db…