4 Commits

Author SHA1 Message Date
Dmitry Ng 930830e742 test(schema): improve test clarity with null byte comments 2026-04-11 13:17:55 +03:00
mason5052 8ddc25f411 test: add failure-path coverage for schema validation
Add missing negative-path tests:
- Schema.Valid() with invalid $ref that fails compilation
- GetValidator() with same invalid schema returns error
- ValidateBytes() with malformed JSON input returns error
2026-03-31 21:54:51 -04:00
mason5052 cc0260b205 test: add unit tests for schema package JSON Schema validation
Add comprehensive test coverage for the schema package including
Schema validation, JSON Schema Draft 7 compilation, document validation,
database serialization, and custom Type marshaling.

Tests cover:
- Schema.Valid() with various schema types (string, object, array, etc.)
- Schema.GetValidator() compilation
- Schema.ValidateString/ValidateBytes/ValidateGo with valid and invalid docs
- Schema.Value()/Scan() database serialization round-trip
- Type.MarshalJSON() including object auto-properties and ExtProps
- Type.UnmarshalJSON() including ExtProps extraction
- Pattern, enum, and array constraint validation
- scanFromJSON helper with string, bytes, and error cases
2026-03-31 20:37:16 -04:00
Dmitry Ng b90ea4711e repo final state 2026-03-26 06:16:07 +03:00