Skip to content

Commit cd28ddc

Browse files
authored
mock: remove Error.captureStackTrace in MockNotMatchedError (#3587)
* mock: remove Error.captureStackTrace in MockNotMatchedError * add jsdoc comment
1 parent b54d24b commit cd28ddc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mock/mock-errors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
const { UndiciError } = require('../core/errors')
44

5+
/**
6+
* The request does not match any registered mock dispatches.
7+
*/
58
class MockNotMatchedError extends UndiciError {
69
constructor (message) {
710
super(message)
8-
Error.captureStackTrace(this, MockNotMatchedError)
911
this.name = 'MockNotMatchedError'
1012
this.message = message || 'The request does not match any registered mock dispatches'
1113
this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'

0 commit comments

Comments
 (0)