fix: "fast" versions of uri/uri-reference formats to pass JSON-Schema-Test-Suite draft-06/07
parent
a38c000e72
commit
d25f31b1bb
|
@ -36,8 +36,8 @@ formats.fast = {
|
|||
time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
||||
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
|
||||
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
||||
uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,
|
||||
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
|
||||
uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,
|
||||
'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
||||
'uri-template': URITEMPLATE,
|
||||
url: URL,
|
||||
// email (sources from jsen validator):
|
||||
|
|
|
@ -29,11 +29,11 @@ runTest(getAjvInstances(options, {meta: false, schemaId: 'id'}), 4, typeof windo
|
|||
? suite(require('./JSON-Schema-Test-Suite/tests/draft4/{**/,}*.json', {mode: 'list'}))
|
||||
: './JSON-Schema-Test-Suite/tests/draft4/{**/,}*.json');
|
||||
|
||||
runTest(getAjvInstances(options, {meta: false, format: 'full'}), 6, typeof window == 'object'
|
||||
runTest(getAjvInstances(options, {meta: false}), 6, typeof window == 'object'
|
||||
? suite(require('./JSON-Schema-Test-Suite/tests/draft6/{**/,}*.json', {mode: 'list'}))
|
||||
: './JSON-Schema-Test-Suite/tests/draft6/{**/,}*.json');
|
||||
|
||||
runTest(getAjvInstances(options, {format: 'full'}), 7, typeof window == 'object'
|
||||
runTest(getAjvInstances(options), 7, typeof window == 'object'
|
||||
? suite(require('./JSON-Schema-Test-Suite/tests/draft7/{**/,}*.json', {mode: 'list'}))
|
||||
: './JSON-Schema-Test-Suite/tests/draft7/{**/,}*.json');
|
||||
|
||||
|
|
Loading…
Reference in New Issue