I'm using nock to mock my api requests in my tests and using persist
to set defaults for the requests.
nock('https://myurl.com')
.persist()
.get(/api\/endpoint/)
.reply(200, data)
But I don't always want to reply with data
. How would I return other data for a certain request?
Aucun commentaire:
Enregistrer un commentaire