How to build nock regex for dynamic urls
问题 How do i build nock configuration for the following types of urls http://example.com/harry/potter?param1=value1 and http://example.com/harry/<value1> I have two type of urls first is where i can have query params altough the base url is fixed. Second one is where base url has dynamic values. Currently i have before(function(){ nock('http://example.com') .get('/terminal/chrome_log') .reply(200, "OK"); nock('http://example.com') .get(function(uri) { return uri.indexOf('harry') >= 0; }) .reply