From 5beb72c6bd81d967cb55b223fe5c9364612c1132 Mon Sep 17 00:00:00 2001 From: Ivan Tymoshenko Date: Sat, 21 Oct 2023 13:42:12 +0200 Subject: [PATCH] update error message --- index.js | 2 +- test/deref-schema.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ea0b3a5..a912273 100644 --- a/index.js +++ b/index.js @@ -99,7 +99,7 @@ class RefResolver { const targetSchema = this.getDerefSchema(refSchemaId, refJsonPointer) if (targetSchema === null) { throw new Error( - `Cannot resolve ref "${ref.ref}". Ref ${refJsonPointer} is not found in schema "${refSchemaId}".` + `Cannot resolve ref "${ref.ref}". Ref "${refJsonPointer}" is not found in schema "${refSchemaId}".` ) } diff --git a/test/deref-schema.test.js b/test/deref-schema.test.js index 8d35d7b..2efd5d7 100644 --- a/test/deref-schema.test.js +++ b/test/deref-schema.test.js @@ -230,7 +230,7 @@ test('should throw if target ref schema is not found', () => { } catch (error) { assert.strictEqual( error.message, - 'Cannot resolve ref "#foo". Ref #foo is not found in schema "relativeAddress".' + 'Cannot resolve ref "#foo". Ref "#foo" is not found in schema "relativeAddress".' ) } })