mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Simplified JSON schema for config file in advance of adding config overrides for execution contexts.
This commit is contained in:
parent
a4873a6a83
commit
2c313972d3
@ -42,12 +42,14 @@ describe('Diagnostic overrides', () => {
|
||||
for (const propName of overrideNamesInJson) {
|
||||
const p = json.properties[propName];
|
||||
|
||||
expect(p['$id']).toEqual(`#/properties/${propName}`);
|
||||
expect(p['$ref']).toEqual(`#/definitions/diagnostic`);
|
||||
expect(p.title).toBeDefined();
|
||||
expect(p.title.length).toBeGreaterThan(0);
|
||||
expect(p.default).toBeDefined();
|
||||
expect(enumValues).toContain(p.default);
|
||||
const ref = p['$ref'];
|
||||
const def = json.definitions[ref.substring(ref.lastIndexOf('/') + 1)];
|
||||
|
||||
expect(def['$ref']).toEqual(`#/definitions/diagnostic`);
|
||||
expect(def.title).toBeDefined();
|
||||
expect(def.title.length).toBeGreaterThan(0);
|
||||
expect(def.default).toBeDefined();
|
||||
expect(enumValues).toContain(def.default);
|
||||
}
|
||||
|
||||
const overrideNamesInCode: string[] = Object.values(DiagnosticRule).filter((x) => x.startsWith('report'));
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user