Skip to content

Commit e57ef2b

Browse files
Ronald Holshausenmefellows
authored andcommitted
fix: readme example (#320)
* fix: readme example * fix: expect provider verify needs to be a function
1 parent 058ab6f commit e57ef2b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ describe("Pact", () => {
230230
// (4) write your test(s)
231231
it("generates a list of TODOs for the main screen", () => {
232232
const todoApp = new TodoApp()
233-
todoApp
233+
return todoApp
234234
.getProjects() // <- this method would make the remote http call
235235
.then(projects => {
236236
expect(projects).to.be.a("array")
237237
expect(projects).to.have.deep.property("projects[0].id", 1)
238238

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

0 commit comments

Comments
 (0)