Skip to content

Commit

Permalink
fix: readme example (#320)
Browse files Browse the repository at this point in the history
* fix: readme example

* fix: expect provider verify needs to be a function
  • Loading branch information
Ronald Holshausen authored and mefellows committed Jun 30, 2019
1 parent 058ab6f commit e57ef2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ describe("Pact", () => {
// (4) write your test(s)
it("generates a list of TODOs for the main screen", () => {
const todoApp = new TodoApp()
todoApp
return todoApp
.getProjects() // <- this method would make the remote http call
.then(projects => {
expect(projects).to.be.a("array")
expect(projects).to.have.deep.property("projects[0].id", 1)

// (5) validate the interactions you've registered and expected occurred
// this will throw an error if it fails telling you what went wrong
expect(provider.verify()).to.not.throw()
expect(() => provider.verify()).to.not.throw()
})
})

Expand Down

0 comments on commit e57ef2b

Please sign in to comment.