From 28dcdd6184414597b42af85e715ed82bafcf3833 Mon Sep 17 00:00:00 2001 From: Florian Vogt Date: Tue, 20 Dec 2022 09:57:42 +0100 Subject: [PATCH] [INTERNAL] AbstractAdapter: Correct typo in error message (#457) --- lib/adapters/AbstractAdapter.js | 2 +- test/lib/adapters/AbstractAdapter.js | 2 +- test/lib/resources.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/adapters/AbstractAdapter.js b/lib/adapters/AbstractAdapter.js index 7061a817..f736fab8 100644 --- a/lib/adapters/AbstractAdapter.js +++ b/lib/adapters/AbstractAdapter.js @@ -210,7 +210,7 @@ class AbstractAdapter extends AbstractReaderWriter { _write(resource) { if (!resource.getPath().startsWith(this._virBasePath)) { - throw new Error(`The path of the resource '${resource.getPath()}' does not starts with ` + + throw new Error(`The path of the resource '${resource.getPath()}' does not start with ` + `the configured virtual base path of the adapter '${this._virBasePath}'`); } diff --git a/test/lib/adapters/AbstractAdapter.js b/test/lib/adapters/AbstractAdapter.js index 970e6053..45dacc09 100644 --- a/test/lib/adapters/AbstractAdapter.js +++ b/test/lib/adapters/AbstractAdapter.js @@ -57,6 +57,6 @@ test("Create a resource with a path not starting with path configured in the ada const error = t.throws(() => writer._write(resource)); t.is(error.message, - "The path of the resource '/dest2/tmp/test.js' does not starts with the configured " + + "The path of the resource '/dest2/tmp/test.js' does not start with the configured " + "virtual base path of the adapter '/dest2/writer/'"); }); diff --git a/test/lib/resources.js b/test/lib/resources.js index 76292340..b910fba2 100644 --- a/test/lib/resources.js +++ b/test/lib/resources.js @@ -142,7 +142,7 @@ for (const adapter of adapters) { }); const error = await t.throwsAsync(dest.write(resource)); - t.is(error.message, "The path of the resource '/dest2/tmp/test.js' does not starts with the configured " + + t.is(error.message, "The path of the resource '/dest2/tmp/test.js' does not start with the configured " + "virtual base path of the adapter '/dest2/writer/'"); });