mock-errors.js 439 B

1234567891011121314151617
  1. 'use strict'
  2. const { UndiciError } = require('../core/errors')
  3. class MockNotMatchedError extends UndiciError {
  4. constructor (message) {
  5. super(message)
  6. Error.captureStackTrace(this, MockNotMatchedError)
  7. this.name = 'MockNotMatchedError'
  8. this.message = message || 'The request does not match any registered mock dispatches'
  9. this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'
  10. }
  11. }
  12. module.exports = {
  13. MockNotMatchedError
  14. }