All conformance tests
/conf/functions/
- /conf/functions/alphabetical:
alphabetical fails on an unsorted array and passes on a sorted one. - /conf/functions/alphabetical-case: Strings are compared with
localeCompare, so a comes before B and B after a. - /conf/functions/alphabetical-keyed-by: With
keyedBy, an array of objects is compared by that property. - /conf/functions/alphabetical-numbers: Numbers are compared by value, so
[2, 10] is in order and [10, 9] is not. - /conf/functions/casing:
casing with type: kebab fails on a camel-case string. - /conf/functions/casing-non-ascii: Only ASCII letters count, so
éclair is not camel case; the empty string passes. - /conf/functions/casing-types: Each case accepts a value written in it and rejects one written in another case.
- /conf/functions/defined:
defined fails on an absent property and passes on a present one. - /conf/functions/enumeration:
enumeration fails on a value outside values. - /conf/functions/enumeration-types:
"1" is not one of [1], while 1.0 is. - /conf/functions/falsy:
falsy fails on an empty array, an empty object, and a string, and passes on false, "", 0, and null. - /conf/functions/input-types:
pattern passes on a number and on an absent value, and fails only on the string that does not match; xor passes on a string. - /conf/functions/length:
length with max: 4 fails on a string of six characters and an array of five elements, and passes on a number below the bound. - /conf/functions/length-code-units: A string's length is its number of UTF-16 code units:
é is one, an emoji two. - /conf/functions/length-min:
length with min: 2 fails on an object with one property and a string of one character, and passes on an object with two. - /conf/functions/or:
or fails unless at least one of properties is present. - /conf/functions/or-null: A key whose value is null counts as present, so
{a: null} satisfies or and {} does not. - /conf/functions/pattern:
match fails on a string that does not match, notMatch fails on one that does. - /conf/functions/schema:
schema fails on a value that does not validate against the given JSON Schema. - /conf/functions/schema-absent:
schema fails on an absent value. - /conf/functions/schema-all-errors: With
allErrors: true, a value that fails two keywords gets two problems. - /conf/functions/schema-default-draft: Without
$schema or dialect, the schema is read as draft 7: prefixItems is ignored, required is not. - /conf/functions/schema-dialect: With
dialect: draft2020-12, prefixItems applies. - /conf/functions/schema-first-error: Without
allErrors, a value that fails two keywords gets one problem. - /conf/functions/schema-format: The
format keyword is asserted, so not-an-email fails format: email. - /conf/functions/schema-ref: A
$ref inside the option resolves against the option's own $defs. - /conf/functions/truthy:
truthy fails on false, "", 0, and null, and passes on an empty array, an empty object, and a string. - /conf/functions/undefined:
undefined fails on a present property and passes on an absent one. - /conf/functions/unreferenced-reusable-object:
unreferencedReusableObject reports a member of the container that nothing references. - /conf/functions/xor:
xor fails unless exactly one of properties is present. - /conf/functions/xor-null: A key whose value is null counts as present, so
{a: null, b: 1} has two of the properties.