(ajv)
| 8 | testOptionMeta(new _Ajv({meta: true})) |
| 9 | |
| 10 | function testOptionMeta(ajv) { |
| 11 | ajv.getSchema("http://json-schema.org/draft-07/schema").should.be.a("function") |
| 12 | ajv.validateSchema({$id: "ok", type: "integer"}).should.equal(true) |
| 13 | ajv.validateSchema({$id: "wrong", type: 123}).should.equal(false) |
| 14 | should.not.throw(() => { |
| 15 | ajv.addSchema({$id: "ok", type: "integer"}) |
| 16 | }) |
| 17 | should.throw(() => { |
| 18 | ajv.addSchema({$id: "wrong", type: 123}) |
| 19 | }, /schema is invalid/) |
| 20 | } |
| 21 | }) |
| 22 | |
| 23 | it("should throw if meta: false and validateSchema: true", () => { |
no test coverage detected
searching dependent graphs…