You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like nock function should specifiy only the hostname and not the whole path.
e.g. this is working:
it.only('post with another regexp as spec',async()=>{constscope=nock('http://localhost').get(newRegExp("^/api/v2/users/first")).reply(200,'Match regex');const{ statusCode }=awaitgot.get('http://localhost/api/v2/users/first')expect(statusCode).to.equal(200)scope.done()})
Can you specifiy the path in the get/post/etc function instead?
Please avoid duplicates
Reproducible test case
https://runkit.com/brunoquaresma/63755661db9fc7000800fa7e
Nock Version
13.2.9
Node Version
14.21.1
TypeScript Version
No response
What happened?
I'm trying to use regex to match the path but it is not working:
Would you be interested in contributing a fix?
The text was updated successfully, but these errors were encountered: