-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): support json schema validation (#6532)
* feat(tests): support json schema validation * add json schema to cli test --------- Co-authored-by: gatzjames <[email protected]>
- Loading branch information
1 parent
6fa7e5d
commit 1d97689
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.UnitTest.db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"_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);"} | ||
{"_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)"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters