expression-language
Version:
Javascript implementation of symfony/expression-language
14 lines (13 loc) • 647 B
JavaScript
;
var _LogicException = _interopRequireDefault(require("../LogicException"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
test('is an Error subclass with a LogicException name', () => {
let error = new _LogicException.default('something went wrong');
expect(error).toBeInstanceOf(Error);
expect(error.name).toBe('LogicException');
expect(error.message).toBe('something went wrong');
});
test('toString formats the name and message', () => {
let error = new _LogicException.default('something went wrong');
expect(error.toString()).toBe('LogicException: something went wrong');
});