mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Validate JSON configuration schema $id matches $schema.default.
This commit is contained in:
parent
d2a0f74bbd
commit
7df23eed2c
1 changed files with 2 additions and 1 deletions
|
|
@ -1002,13 +1002,14 @@ test("validateConfigSchemaAppliesToUnknownProperties", (t) => {
|
|||
});
|
||||
|
||||
test("validateConfigExampleJson", async(t) => {
|
||||
t.plan(2);
|
||||
t.plan(3);
|
||||
const { "default": stripJsonComments } = await import("strip-json-comments");
|
||||
|
||||
// Validate schema
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchema = ajv.compile(configSchema);
|
||||
t.is(configSchema.$id, configSchema.properties.$schema.default);
|
||||
|
||||
// Validate JSONC
|
||||
const fileJson = ".markdownlint.jsonc";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue