fix: handle invalid values in arrays (#61)
This commit is contained in:
parent
6f4ed9d662
commit
2dcc7efe6f
1 changed files with 28 additions and 4 deletions
|
|
@ -408,6 +408,27 @@ describe("hasRequiredConfigMissing", () => {
|
|||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true when required config is array with invalid values", () => {
|
||||
const manifest: DxtManifest = {
|
||||
...baseManifest,
|
||||
user_config: {
|
||||
paths: {
|
||||
type: "string",
|
||||
title: "Paths",
|
||||
description: "File paths",
|
||||
required: true,
|
||||
multiple: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const result = hasRequiredConfigMissing({
|
||||
manifest,
|
||||
userConfig: { paths: [""] },
|
||||
});
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true when required config is empty array", () => {
|
||||
const manifest: DxtManifest = {
|
||||
...baseManifest,
|
||||
|
|
|
|||
Loading…
Reference in a new issue