We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e70df22 commit 7de578cCopy full SHA for 7de578c
src/methods/getData.test.ts
@@ -806,6 +806,20 @@ describe("getData", () => {
806
}).getData([43]);
807
assert.deepEqual(data, [43, 2]);
808
});
809
+
810
+ it("should add prefixItems with `addOptionalProps: true`", () => {
811
+ const data = compileSchema(
812
+ {
813
+ type: "array",
814
+ prefixItems: [{ type: "boolean", default: true }],
815
+ items: { type: "number", default: 2 }
816
+ },
817
818
+ getDataDefaultOptions: { addOptionalProps: true }
819
+ }
820
+ ).getData();
821
+ assert.deepEqual(data, [true]);
822
+ });
823
824
825
describe("oneOf", () => {
0 commit comments