-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Given this project is based on Nock, I supposed that it handled RegExp for specifying paths as Nock does.
I tested using the code provided in the README.md with some changes to match a path using a RegExp. Here follows
const http = require('http')
const hock = require('hock')
const request = require('request')
const mock = hock.createHock()
mock
.get(/source$/)
.reply(200, 'Hello!')
const server = http.createServer(mock.handler)
server.listen(1337, function () {
console.log('Hock server listening at http://localhost:1337')
})
process.on('uncaughtException', (err) => {
console.log('Whoops! There was an uncaught error\n', err)
})When accessing http://localhost:1337/source I get an error for a non-matching route. Do you have any plan to support RegExp as Nock does?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels