Skip to content

Commit

Permalink
fix: mock not found error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 25, 2018
1 parent 1d27b5f commit b07c1b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ function proxy (state, {target}) {
'Content-Type': 'application/json; charset=utf-8'
})

const [expected, actual] = error.message
const [expected] = error.message
.substr('Nock: No match for request '.length)
.split(' Got instead ')

response.end(JSON.stringify({
error: 'Nock: No match for request',
detail: {
expected: JSON.parse(expected),
actual: JSON.parse(actual)
expected: JSON.parse(expected)
}
}, null, 2) + '\n')
},
Expand Down

0 comments on commit b07c1b4

Please sign in to comment.