Mockserver serving mocks {verbose:true} under "mockapi" at http://localhost:8080 Reading from mockapi\trials\GET.mock file: Matched C:\Users\arunn3\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:17 const regex = /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/gi; ^
SyntaxError: Invalid regular expression: /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/: Invalid group at parseStatus (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:17:17) at Monad.map (\AppData\Roaming\npm\node_modules\mockserver\monad.js:4:25) at parse (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:85:6) at (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:389:22 at IncomingMessage.<anonymous> (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:281: 5) at emitNone (events.js:106:13) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)
I tried the regular expression /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/gi and it works ; the mock content I used is as below :
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 { "Random": "content" }
Mockserver serving mocks {verbose:true} under "mockapi" at http://localhost:8080 Reading from mockapi\trials\GET.mock file: Matched C:\Users\arunn3\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:17 const regex = /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/gi; ^
SyntaxError: Invalid regular expression: /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/: Invalid group at parseStatus (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:17:17) at Monad.map (\AppData\Roaming\npm\node_modules\mockserver\monad.js:4:25) at parse (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:85:6) at (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:389:22 at IncomingMessage.<anonymous> (\AppData\Roaming\npm\node_modules\mockserver\mockserver.js:281: 5) at emitNone (events.js:106:13) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)
I tried the regular expression /(?<=HTTP\/\d.\d\s{1,1})(\d{3,3})(?=[a-z0-9\s]+)/gi and it works ; the mock content I used is as below :
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 { "Random": "content" }
What is wrong here ???