Skip to content

Commit

Permalink
fix(plugin-manifest-validator): update default non-existent file mess…
Browse files Browse the repository at this point in the history
…age (#2253)
  • Loading branch information
tuanphamcybozu authored Aug 31, 2023
1 parent f23e394 commit 8cbd044
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-manifest-validator/src/__tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ describe("validator", () => {
assert.deepStrictEqual(error, {
instancePath,
keyword: "fileExists",
message: `File not found: ${filePath}`,
message: `file should exist ("${filePath}")`,
schemaPath,
});
}
Expand Down Expand Up @@ -420,7 +420,7 @@ describe("validator", () => {
errorIndex = 1;
}

const customMessage = "Custom message: File not found 404";
const customMessage = `Custom message: file should exist ("config/not_exist.js")`;
const actual = validator(json(source), {
fileExists: (path) => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-manifest-validator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default (
}

const result = fileExists(filePath);
const defaultMessage = `File not found: ${filePath}`;
const defaultMessage = `file should exist ("${filePath}")`;

if (result === false) {
validateFileExists.errors = [
Expand Down

0 comments on commit 8cbd044

Please sign in to comment.