Skip to content

Commit

Permalink
[INTERNAL] AbstractAdapter: Correct typo in error message (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt authored Dec 20, 2022
1 parent 2ef6dc8 commit 28dcdd6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/adapters/AbstractAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}'`);
}

Expand Down
2 changes: 1 addition & 1 deletion test/lib/adapters/AbstractAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'");
});
2 changes: 1 addition & 1 deletion test/lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'");
});

Expand Down

0 comments on commit 28dcdd6

Please sign in to comment.