(passContext)
| 74 | }) |
| 75 | |
| 76 | function getValidate(passContext) { |
| 77 | ajv = new _Ajv({passContext: passContext, inlineRefs: false}) |
| 78 | ajv.addKeyword({keyword: "testValidate", validate: storeContext}) |
| 79 | ajv.addKeyword({keyword: "testCompile", compile: compileTestValidate}) |
| 80 | |
| 81 | const schema = { |
| 82 | definitions: { |
| 83 | test1: { |
| 84 | testValidate: true, |
| 85 | testCompile: true, |
| 86 | }, |
| 87 | test2: { |
| 88 | allOf: [{$ref: "#/definitions/test1"}], |
| 89 | }, |
| 90 | }, |
| 91 | allOf: [{$ref: "#/definitions/test1"}, {$ref: "#/definitions/test2"}], |
| 92 | } |
| 93 | |
| 94 | return ajv.compile(schema) |
| 95 | } |
| 96 | |
| 97 | function storeContext(this: any) { |
| 98 | contexts.push(this) |
no test coverage detected
searching dependent graphs…