diff --git a/README.md b/README.md index f039fc1f..3a11fe0f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # OpenRPC Utils For Javascript [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=open-rpc/schema-utils-js)](https://dependabot.com) - +[![codecov](https://codecov.io/gh/open-rpc/schema-utils-js/branch/master/graph/badge.svg)](https://codecov.io/gh/open-rpc/schema-utils-js) ### Contributing How to contribute, build and release are outlined in [CONTRIBUTING.md](CONTRIBUTING.md), [BUILDING.md](BUILDING.md) and [RELEASING.md](RELEASING.md) respectively. Commits in this repository follow the [CONVENTIONAL_COMMITS.md](CONVENTIONAL_COMMITS.md) specification. - diff --git a/src/generate-method-id.ts b/src/generate-method-id.ts index a7f9ced7..e61de004 100644 --- a/src/generate-method-id.ts +++ b/src/generate-method-id.ts @@ -12,6 +12,7 @@ export class ContentDescriptorNotFoundInMethodError extends Error { * @param contentDescriptor OpenRPC Content Descriptor that was expected to be in the method param. */ constructor(public method: types.MethodObject, public contentDescriptor: types.ContentDescriptorObject) { + /* istanbul ignore next */ super([ "Content Descriptor not found in method.", `Method: ${JSON.stringify(method, undefined, " ")}`, diff --git a/src/method-call-validator/parameter-validation-error.ts b/src/method-call-validator/parameter-validation-error.ts index 8de00465..bbe533fe 100644 --- a/src/method-call-validator/parameter-validation-error.ts +++ b/src/method-call-validator/parameter-validation-error.ts @@ -19,6 +19,7 @@ export default class MethodCallParameterValidationError extends Error { public receievedParam: any, private errors: ErrorObject[], ) { + /* istanbul ignore next */ super([ "Expected param in position ", paramIndex, diff --git a/src/parse-open-rpc-document.ts b/src/parse-open-rpc-document.ts index 27fa02a4..43ad8db8 100644 --- a/src/parse-open-rpc-document.ts +++ b/src/parse-open-rpc-document.ts @@ -26,6 +26,7 @@ export class OpenRPCDocumentDereferencingError extends Error { * @param e The error that originated from jsonSchemaRefParser */ constructor(e: Error) { + /* istanbul ignore next */ super(`The json schema provided cannot be dereferenced. Received Error: \n ${e.message}`); } } diff --git a/src/validate-open-rpc-document.ts b/src/validate-open-rpc-document.ts index ebbdd937..5a2ebc0c 100644 --- a/src/validate-open-rpc-document.ts +++ b/src/validate-open-rpc-document.ts @@ -17,6 +17,7 @@ export class OpenRPCDocumentValidationError extends Error { * @param errors The errors received by ajv.errors. */ constructor(private errors: Ajv.ErrorObject[]) { + /* istanbul ignore next */ super([ "Error validating OpenRPC Document against @open-rpc/meta-schema.", "The errors found are as follows:",