@@ -654,14 +654,13 @@ describe('Content Validation - Comprehensive Test Suite', () => {
654654 query . where ( 'view_count' , QueryOperation . IS_GREATER_THAN , 100 ) ;
655655 query . where ( 'is_published' , QueryOperation . EQUALS , true ) ;
656656
657- // Invalid field UIDs
657+ // Invalid field UIDs (note: field-with-dashes is actually valid as hyphens are allowed)
658658 query . where ( 'invalid field' , QueryOperation . EQUALS , 'test' ) ;
659- query . where ( 'field-with-dashes' , QueryOperation . EQUALS , 'test' ) ;
660- query . where ( '123invalid' , QueryOperation . EQUALS , 'test' ) ;
659+ query . where ( 'field@symbol' , QueryOperation . EQUALS , 'test' ) ;
661660
662661 // Check that console.error was called for invalid field UIDs
663662 expect ( consoleSpy ) . toHaveBeenCalledWith ( ErrorMessages . INVALID_FIELD_UID ) ;
664- expect ( consoleSpy ) . toHaveBeenCalledTimes ( 3 ) ;
663+ expect ( consoleSpy ) . toHaveBeenCalledTimes ( 2 ) ;
665664
666665 consoleSpy . mockRestore ( ) ;
667666 } ) ;
@@ -708,14 +707,14 @@ describe('Content Validation - Comprehensive Test Suite', () => {
708707 // Valid value types
709708 query . equalTo ( 'title' , 'string value' ) ;
710709 query . equalTo ( 'view_count' , 123 ) ;
711- query . equalTo ( 'is_published' , true ) ;
712710
713- // Invalid value types for equalTo (expects string, number, or boolean)
711+ // Invalid value types for equalTo (expects string or number, not boolean)
712+ query . equalTo ( 'is_published' , true as any ) ; // boolean triggers error
714713 query . equalTo ( 'title' , [ ] as any ) ;
715714 query . equalTo ( 'title' , { } as any ) ;
716715
717716 expect ( consoleSpy ) . toHaveBeenCalledWith ( ErrorMessages . INVALID_VALUE_STRING_OR_NUMBER ) ;
718- expect ( consoleSpy ) . toHaveBeenCalledTimes ( 2 ) ;
717+ expect ( consoleSpy ) . toHaveBeenCalledTimes ( 3 ) ;
719718
720719 consoleSpy . mockRestore ( ) ;
721720 } ) ;
0 commit comments