Let's assume I have a url like this http://domain.com/foo/bar?name=john without trailing slash. And try to mock it like this:
nock('http://domain.com/foo/bar')
.persist()
.get('') // here we have error: Non-wildcard URL path strings must begin with a slash
.query(true)
.delay(delayTime)
.reply(200);
I don't wan't trailing slash in the url, but nock forces me to add it into .get(). If I add slash there, nock doesn't match my url.
Is this a bug or there is a way to do this without trailing slash?
Let's assume I have a url like this
http://domain.com/foo/bar?name=johnwithout trailing slash. And try to mock it like this:I don't wan't trailing slash in the url, but nock forces me to add it into
.get(). If I add slash there, nock doesn't match my url.Is this a bug or there is a way to do this without trailing slash?