Skip to content

Commit 5a465b2

Browse files
Added console.error mock to suppress the error output
1 parent 1508842 commit 5a465b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/unit/content-validation-comprehensive.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ describe('Content Validation - Comprehensive Test Suite', () => {
872872

873873
describe('Content Validation Edge Cases', () => {
874874
it('should handle null and undefined values gracefully', () => {
875+
// Mock console.error to suppress validation messages
876+
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
877+
875878
const query = new Query(client, {}, {}, '', 'blog_post');
876879

877880
// Test with null values
@@ -881,6 +884,9 @@ describe('Content Validation - Comprehensive Test Suite', () => {
881884
// Test with empty strings
882885
expect(() => query.equalTo('title', '')).not.toThrow();
883886
expect(() => query.equalTo('view_count', 0)).not.toThrow();
887+
888+
// Restore console.error
889+
consoleSpy.mockRestore();
884890
});
885891

886892
it('should validate content type without schema', async () => {

0 commit comments

Comments
 (0)