insomnia/packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.UnitTest.db
KobeNguyenT 1d9768909b
feat(tests): support json schema validation (#6532)
* feat(tests): support json schema validation

* add json schema to cli test

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2023-12-06 16:09:46 +00:00

2 lines
642 B
Plaintext

{"_id":"ut_babcaf85ec1b481ebed1e1cd1aa61a75","type":"UnitTest","parentId":"uts_b12681ace8eb4e5999b5b51677c4c269","modified":1632964811893,"created":1632962936043,"requestId":"req_f2cd394aad83485c8f7bee1b612165d5","name":"Returns 200","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);\nconst schema = {\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Response Schema\",\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ]\n}\nexpect(JSON.parse(response1.data)).to.be.jsonSchema(schema)"}