File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ test("validateSchema - required properties are required", async (t) => {
2828 t . true ( json . validateSchema ( testSchema , { requiredKey : "foo" } ) ) ;
2929} ) ;
3030
31- test ( "validateSchema - optional properties are optional" , async ( t ) => {
31+ test ( "validateSchema - optionalOrNullSchema properties are optional or null " , async ( t ) => {
3232 // Optional fields may be absent
3333 t . true ( json . validateSchema ( optionalOrNullSchema , { } ) ) ;
3434 t . true ( json . validateSchema ( optionalOrNullSchema , { optionalKey : undefined } ) ) ;
@@ -49,7 +49,7 @@ const optionalSchema = {
4949 optionalKey : json . optional ( json . string ) ,
5050} ;
5151
52- test ( "validateSchema - optional properties may be absent or undefined, but reject null " , async ( t ) => {
52+ test ( "validateSchema - optional properties are optional " , async ( t ) => {
5353 // Optional fields may be absent or explicitly undefined
5454 t . true ( json . validateSchema ( optionalSchema , { } ) ) ;
5555 t . true ( json . validateSchema ( optionalSchema , { optionalKey : undefined } ) ) ;
You can’t perform that action at this time.
0 commit comments