Skip to content

Commit bd1c6bc

Browse files
authored
Add comprehensive validator error message test suite (#266)
* Add ValidatorMessageFormatSpec to validate error message backward compatibility This spec serves as a baseline for validator 1.0.76 error message format. It tests all major validator types to ensure error messages remain consistent after upgrading json-schema-validator to 1.5.8. All 20 tests pass with validator 1.0.76, confirming that the test expectations accurately capture the current error message behavior. * Add comprehensive validator error message backward compatibility test suite Added ValidatorMessageFormatSpec with complete coverage of all JSON Schema Draft 4 validation keywords supported by json-schema-validator 1.0.76. ## Coverage (26 validators) - Numeric: minimum, maximum, multipleOf, exclusiveMinimum, exclusiveMaximum - String: minLength, maxLength, pattern - Array: minItems, maxItems, uniqueItems, items, additionalItems - Object: minProperties, maxProperties, required, additionalProperties, patternProperties, dependencies - Type: type, enum - Composition: allOf, anyOf, oneOf, not - Format: format ## Implementation Details - All test methods numbered sequentially (e1-e26) matching spec definition order - All assertions use beEqualTo with exact error messages for precise matching - No fuzzy contain() assertions - maximum confidence in error message stability This baseline test suite will be used to verify backward compatibility when upgrading from json-schema-validator 1.0.76 to 1.5.8.
1 parent ee4d9c6 commit bd1c6bc

File tree

1 file changed

+476
-0
lines changed

1 file changed

+476
-0
lines changed

0 commit comments

Comments
 (0)