MCPcopy
hub / github.com/ajv-validator/ajv / test

Function test

spec/javacript.spec.js:9–14  ·  view source on GitHub ↗
(_Ajv)

Source from the content-addressed store, hash-verified

7 describe("draft-2019-09", () => it("should validate", () => test(Ajv2019)))
8
9 function test(_Ajv) {
10 const ajv = new _Ajv()
11 const validate = ajv.compile({type: "number"})
12 assert.strictEqual(validate(1), true)
13 assert.strictEqual(validate("1"), false)
14 }
15})

Callers 1

javacript.spec.jsFile · 0.70

Calls 2

validateFunction · 0.85
compileMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…