mock-errors.js 454 B

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