fix: handle invalid values in arrays (#61)

This commit is contained in:
Samuel Attard 2025-07-10 16:10:48 -07:00 • committed by GitHub
commit 2dcc7efe6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,