Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlisted dependencies? #3

Closed
bakerej opened this issue May 10, 2017 · 1 comment
Closed

Unlisted dependencies? #3

bakerej opened this issue May 10, 2017 · 1 comment

Comments

@bakerej
Copy link

bakerej commented May 10, 2017

The example code uses

expect(res.json).to.be.calledWith({ foo: request.body.foo.bar })

but only imports

import route from "../src/foo" import { mockReq, mockRes } from "sinon-express-mock"

Where is "expect" coming from? chai-http has an expect().to.be.calledWith method, but just using it in conjunction with the example code still throws the same error.

@danawoodman
Copy link
Owner

Ah, good catch. I normally make expect global in my test helper, but I'll make example use explicit import since it's clearer 👍

Added in 642c0e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants