@atlas.js/errors
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="0.2.1"></a> | ||
## [0.2.1](https://github.com/strvcom/atlas.js/compare/@atlas.js/errors@0.2.0...@atlas.js/errors@0.2.1) (2018-07-12) | ||
**Note:** Version bump only for package @atlas.js/errors | ||
<a name="0.2.0"></a> | ||
@@ -8,0 +16,0 @@ # 0.2.0 (2018-05-22) |
{ | ||
"name": "@atlas.js/errors", | ||
"description": "The parent class for all errors thrown by @atlas.js", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Robert Rossmann <robert.rossmann@strv.com>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/strvcom/atlas.js/issues", |
@@ -28,2 +28,2 @@ "use strict"; | ||
exports.ValidationError = ValidationError; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4Lm1qcyJdLCJuYW1lcyI6WyJGcmFtZXdvcmtFcnJvciIsIkVycm9yIiwiY29uc3RydWN0b3IiLCJtZXNzYWdlIiwiY2FwdHVyZVN0YWNrVHJhY2UiLCJuYW1lIiwiVmFsaWRhdGlvbkVycm9yIiwiZXJyb3JzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEsTUFBTUEsY0FBTixTQUE2QkMsS0FBN0IsQ0FBbUM7QUFDakNDLGNBQVlDLE9BQVosRUFBcUI7QUFDbkIsVUFBTUEsT0FBTjtBQUVBRixVQUFNRyxpQkFBTixDQUF3QixJQUF4QixFQUE4QixLQUFLRixXQUFuQztBQUNBLFNBQUtHLElBQUwsR0FBWSxLQUFLSCxXQUFMLENBQWlCRyxJQUE3QjtBQUNEOztBQU5nQzs7OztBQWFuQyxNQUFNQyxlQUFOLFNBQThCTixjQUE5QixDQUE2QztBQUMzQ0UsY0FBWUssU0FBUyxFQUFyQixFQUF5QjtBQUN2QixVQUFNLDJCQUFOO0FBRUEsU0FBS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tUcmFjZSh0aGlzLCB0aGlzLmNvbnN0cnVjdG9yKVxuICAgIHRoaXMubmFtZSA9IHRoaXMuY29uc3RydWN0b3IubmFtZVxuICB9XG59XG5cbi8qKlxuICogRXJyb3IgcmVwcmVzZW50aW5nIGEgZmFpbGVkIEpTT04gc2NoZW1hIHZhbGlkYXRpb25cbiAqIEBleHRlbmRzICAgIEZyYW1ld29ya0Vycm9yXG4gKi9cbmNsYXNzIFZhbGlkYXRpb25FcnJvciBleHRlbmRzIEZyYW1ld29ya0Vycm9yIHtcbiAgY29uc3RydWN0b3IoZXJyb3JzID0ge30pIHtcbiAgICBzdXBlcignQXRsYXMuanMgdmFsaWRhdGlvbiBlcnJvcicpXG5cbiAgICB0aGlzLmVycm9ycyA9IGVycm9yc1xuICB9XG59XG5cbmV4cG9ydCB7XG4gIEZyYW1ld29ya0Vycm9yLFxuICBWYWxpZGF0aW9uRXJyb3IsXG59XG4iXX0= |
@@ -16,3 +16,22 @@ "use strict"; | ||
}); | ||
describe('ValidationError', () => { | ||
it('exists', () => { | ||
expect(errors.ValidationError).to.be.a('function'); | ||
}); | ||
it('inherits from FrameworkError', () => { | ||
expect(new errors.ValidationError()).to.be.instanceOf(errors.FrameworkError); | ||
}); | ||
it('exposes the constructor argument as this.errors', () => { | ||
const data = { | ||
error: '123' | ||
}; | ||
const err = new errors.ValidationError(data); | ||
expect(err.errors).to.eql(data); | ||
}); | ||
it('works even if no errors are given to the constructor', () => { | ||
const err = new errors.ValidationError(); | ||
expect(err.errors).to.be.an('object'); | ||
}); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwaS50ZXN0Lm1qcyJdLCJuYW1lcyI6WyJkZXNjcmliZSIsIml0IiwiZXhwZWN0IiwiZXJyb3JzIiwiRnJhbWV3b3JrRXJyb3IiLCJ0byIsImJlIiwiYSIsImluc3RhbmNlT2YiLCJFcnJvciJdLCJtYXBwaW5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igpKS50by5iZS5pbnN0YW5jZU9mKGVycm9ycy5GcmFtZXdvcmtFcnJvcilcbiAgICB9KVxuXG4gICAgaXQoJ2V4cG9zZXMgdGhlIGNvbnN0cnVjdG9yIGFyZ3VtZW50IGFzIHRoaXMuZXJyb3JzJywgKCkgPT4ge1xuICAgICAgY29uc3QgZGF0YSA9IHsgZXJyb3I6ICcxMjMnIH1cbiAgICAgIGNvbnN0IGVyciA9IG5ldyBlcnJvcnMuVmFsaWRhdGlvbkVycm9yKGRhdGEpXG5cbiAgICAgIGV4cGVjdChlcnIuZXJyb3JzKS50by5lcWwoZGF0YSlcbiAgICB9KVxuXG4gICAgaXQoJ3dvcmtzIGV2ZW4gaWYgbm8gZXJyb3JzIGFyZSBnaXZlbiB0byB0aGUgY29uc3RydWN0b3InLCAoKSA9PiB7XG4gICAgICBjb25zdCBlcnIgPSBuZXcgZXJyb3JzLlZhbGlkYXRpb25FcnJvcigpXG5cbiAgICAgIGV4cGVjdChlcnIuZXJyb3JzKS50by5iZS5hbignb2JqZWN0JylcbiAgICB9KVxuICB9KVxufSlcbiJdfQ== |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11975
108