Z User
phase7: MCP stdio smoke test (handshake + tools/list + get_roots 6:74) — 4/4 tests PASS
54a6341 Download node_modules/fast-uri/test/ajv.test.js from bravesigma/quran-md-plugin: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/fast-uri/test/ajv.test.js
- Command line
-
hf download hf://datasets/bravesigma/quran-md-plugin/node_modules/fast-uri/test/ajv.test.js
-
curl -L -o ajv.test.js https://huggingface.co/datasets/bravesigma/quran-md-plugin/resolve/main/node_modules/fast-uri/test/ajv.test.js
752 Bytes
| const test = require('tape') | |
| const fastURI = require('..') | |
| const AJV = require('ajv') | |
| const ajv = new AJV({ | |
| uriResolver: fastURI // comment this line to see it works with uri-js | |
| }) | |
| test('ajv', t => { | |
| t.plan(1) | |
| const schema = { | |
| $ref: '#/definitions/Record%3Cstring%2CPerson%3E', | |
| definitions: { | |
| Person: { | |
| type: 'object', | |
| properties: { | |
| firstName: { | |
| type: 'string' | |
| } | |
| } | |
| }, | |
| 'Record<string,Person>': { | |
| type: 'object', | |
| additionalProperties: { | |
| $ref: '#/definitions/Person' | |
| } | |
| } | |
| } | |
| } | |
| const data = { | |
| joe: { | |
| firstName: 'Joe' | |
| } | |
| } | |
| const validate = ajv.compile(schema) | |
| t.ok(validate(data)) | |
| }) | |