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 e6165e4 commit 2846187Copy full SHA for 2846187
test/schemaValidation.test.ts
@@ -2094,4 +2094,20 @@ obj:
2094
const result = await parseSetup(content);
2095
assert.equal(result.length, 0);
2096
});
2097
+
2098
+ it('value should match as per schema const on boolean', async () => {
2099
+ schemaProvider.addSchema(SCHEMA_ID, {
2100
+ type: 'object',
2101
+ properties: {
2102
+ prop: {
2103
+ const: true,
2104
+ type: 'boolean',
2105
+ },
2106
2107
+ });
2108
+ const content = `prop: false`;
2109
+ const result = await parseSetup(content);
2110
+ expect(result.length).to.eq(1);
2111
+ expect(result[0].message).to.eq('Value must be true.');
2112
2113
0 commit comments