-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved tests from Ajv, default mode is "full"
- Loading branch information
1 parent
9ad612d
commit d99e1d8
Showing
13 changed files
with
1,073 additions
and
20 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "test"] | ||
path = test | ||
url = [email protected]:json-schema-org/JSON-Schema-Test-Suite.git | ||
[submodule "tests/JSON-Schema-Test-Suite"] | ||
path = tests/JSON-Schema-Test-Suite | ||
url = [email protected]:json-schema-org/JSON-Schema-Test-Suite.git |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tests/JSON-Schema-Test-Suite | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
} |
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
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
Submodule JSON-Schema-Test-Suite
added at
ea4155
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 |
---|---|---|
@@ -0,0 +1,108 @@ | ||
[ | ||
{ | ||
"description": "one property has format set in another property", | ||
"schema": { | ||
"properties": { | ||
"str": { | ||
"format": { | ||
"$data": "1/strFormat" | ||
} | ||
}, | ||
"strFormat": {} | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "a valid date-time string", | ||
"data": { | ||
"str": "1963-06-19T08:30:06.283185Z", | ||
"strFormat": "date-time" | ||
}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "an invalid date-time string", | ||
"data": { | ||
"str": "06/19/1963 08:30:06 PST", | ||
"strFormat": "date-time" | ||
}, | ||
"valid": false | ||
}, | ||
{ | ||
"description": "only RFC3339 not all of ISO 8601 are valid", | ||
"data": { | ||
"str": "2013-350T01:01:01", | ||
"strFormat": "date-time" | ||
}, | ||
"valid": false | ||
}, | ||
{ | ||
"description": "a valid e-mail address", | ||
"data": { | ||
"str": "[email protected]", | ||
"strFormat": "email" | ||
}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "an invalid e-mail address", | ||
"data": { | ||
"str": "2962", | ||
"strFormat": "email" | ||
}, | ||
"valid": false | ||
}, | ||
{ | ||
"description": "valid if the format is undefined", | ||
"data": { | ||
"str": "any value" | ||
}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "fails if value of format is not a string", | ||
"data": { | ||
"str": "1963-06-19T08:30:06.283185Z", | ||
"strFormat": 1963 | ||
}, | ||
"valid": false | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "property name is the format for the property value", | ||
"schema": { | ||
"additionalProperties": { | ||
"format": { | ||
"$data": "0#" | ||
} | ||
} | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "valid formats", | ||
"data": { | ||
"date-time": "1963-06-19T08:30:06.283185Z", | ||
"email": "[email protected]" | ||
}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "invalid date-time", | ||
"data": { | ||
"date-time": "06/19/1963 08:30:06 PST", | ||
"email": "[email protected]" | ||
}, | ||
"valid": false | ||
}, | ||
{ | ||
"description": "invalid e-mail", | ||
"data": { | ||
"date-time": "1963-06-19T08:30:06.283185Z", | ||
"email": "2962" | ||
}, | ||
"valid": false | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.