ngarbezza/testy

View on GitHub
lib/errors.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class TestyError extends Error {
  #reason;

  constructor(reason) {
    super(reason.toString());
    this.#reason = reason;
  }

  reason() {
    return this.#reason;
  }
}

export class InvalidAssertionError extends TestyError {}
export class InvalidConfigurationError extends TestyError {}