Skip to content

Fix/dx 3674 improve test coverage #11

Fix/dx 3674 improve test coverage

Fix/dx 3674 improve test coverage #11

GitHub Actions / Unit Tests succeeded Oct 31, 2025 in 0s

522 passed, 0 failed and 0 skipped

Tests passed successfully

✅ reports/contentstack-delivery/junit/jest-junit.xml

522 tests were completed in 9s with 522 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
test/unit/asset-query.spec.ts 8✅ 230ms
test/unit/asset-transformations-comprehensive.spec.ts 80✅ 3s
test/unit/asset.spec.ts 7✅ 233ms
test/unit/base-query.spec.ts 9✅ 178ms
test/unit/cache.spec.ts 9✅ 583ms
test/unit/content-validation-comprehensive.spec.ts 41✅ 6s
test/unit/contentstack.spec.ts 24✅ 476ms
test/unit/contenttype-query.spec.ts 2✅ 72ms
test/unit/contenttype.spec.ts 4✅ 196ms
test/unit/entries.spec.ts 27✅ 578ms
test/unit/entry-queryable.spec.ts 18✅ 148ms
test/unit/entry.spec.ts 15✅ 366ms
test/unit/global-field-query.spec.ts 2✅ 104ms
test/unit/global-field.spec.ts 2✅ 95ms
test/unit/image-transform.spec.ts 21✅ 120ms
test/unit/live-preview.spec.ts 5✅ 128ms
test/unit/pagination.spec.ts 3✅ 122ms
test/unit/persistance/local-storage.spec.ts 9✅ 68ms
test/unit/persistance/memory-storage.spec.ts 9✅ 58ms
test/unit/persistance/preference-store.spec.ts 21✅ 191ms
test/unit/plugin-comprehensive.spec.ts 16✅ 133ms
test/unit/plugin-interceptor-comprehensive.spec.ts 21✅ 6s
test/unit/query-optimization-comprehensive.spec.ts 37✅ 3s
test/unit/query.spec.ts 23✅ 485ms
test/unit/retry-configuration.spec.ts 15✅ 177ms
test/unit/stack.spec.ts 24✅ 709ms
test/unit/string-extensions.spec.ts 1✅ 32ms
test/unit/sync-operations-comprehensive.spec.ts 16✅ 155ms
test/unit/synchronization.spec.ts 10✅ 105ms
test/unit/taxonomy-query.spec.ts 11✅ 97ms
test/unit/utils.spec.ts 32✅ 276ms

✅ test/unit/asset-query.spec.ts

AssetQuery class
  ✅ should add "version" in queryParams when version method is called
  ✅ should add "include_dimension" in queryParameter when includeDimension method is called
  ✅ should add "include_branch" in queryParameter when includeBranch method is called
  ✅ should add "relative_urls" in queryParameter when relativeUrl method is called
  ✅ should add "include_fallback" in queryParameter when includeFallback method is called
  ✅ should add "locale" in Parameter when locale method is called
  ✅ should return response data when successful
  ✅ should add "query" in queryParameter when query method is called

✅ test/unit/asset-transformations-comprehensive.spec.ts

Asset Transformations - Comprehensive Test Suite › Basic Image Resizing
  ✅ should resize image by width only
  ✅ should resize image by height only
  ✅ should resize image with both width and height
  ✅ should resize image with percentage values
  ✅ should disable upscaling during resize
  ✅ should handle numeric percentage values
Asset Transformations - Comprehensive Test Suite › Format Conversion
  ✅ should convert image to WebP format
  ✅ should convert image to PNG format
  ✅ should convert image to progressive JPEG
  ✅ should convert image to GIF format
  ✅ should convert image to lossless WebP
  ✅ should convert image to lossy WebP
Asset Transformations - Comprehensive Test Suite › Quality Control
  ✅ should set image quality to 50%
  ✅ should set maximum quality (100)
  ✅ should set minimum quality (1)
  ✅ should combine quality with format conversion
Asset Transformations - Comprehensive Test Suite › Auto Optimization
  ✅ should enable auto optimization
  ✅ should combine auto optimization with other transformations
Asset Transformations - Comprehensive Test Suite › Advanced Cropping
  ✅ should crop image with default settings
  ✅ should crop image with aspect ratio
  ✅ should crop image with region specification
  ✅ should crop image with offset
  ✅ should crop image with safe mode enabled
  ✅ should crop image with smart mode enabled
  ✅ should crop image with both safe and smart modes
Asset Transformations - Comprehensive Test Suite › Fit Operations
  ✅ should fit image within bounds
  ✅ should fit image using crop method
Asset Transformations - Comprehensive Test Suite › Trim Operations
  ✅ should trim image with single value
  ✅ should trim image with three values
  ✅ should trim image with four values (top, right, bottom, left)
Asset Transformations - Comprehensive Test Suite › Orientation and Rotation
  ✅ should flip image horizontally
  ✅ should flip image vertically
  ✅ should rotate image right
  ✅ should rotate image left
  ✅ should flip both horizontally and vertically
Asset Transformations - Comprehensive Test Suite › Overlay Operations
  ✅ should add basic overlay
  ✅ should add overlay with bottom alignment
  ✅ should add overlay with multiple alignments
  ✅ should add overlay with repeat pattern
  ✅ should add overlay with custom dimensions
  ✅ should add overlay with percentage dimensions
  ✅ should add overlay with all parameters
Asset Transformations - Comprehensive Test Suite › Padding Operations
  ✅ should add uniform padding
  ✅ should add padding with three values
  ✅ should add padding with four values
Asset Transformations - Comprehensive Test Suite › Background Color
  ✅ should set background color with hex value
  ✅ should set background color with RGB values
  ✅ should set background color with RGBA values
Asset Transformations - Comprehensive Test Suite › Device Pixel Ratio (DPR)
  ✅ should set device pixel ratio
  ✅ should set high DPR value
Asset Transformations - Comprehensive Test Suite › Visual Effects
  ✅ should apply blur effect
  ✅ should apply maximum blur
  ✅ should apply frame effect
  ✅ should apply sharpen effect
  ✅ should apply maximum sharpen settings
Asset Transformations - Comprehensive Test Suite › Color Adjustments
  ✅ should adjust saturation positively
  ✅ should adjust saturation negatively
  ✅ should adjust contrast positively
  ✅ should adjust contrast negatively
  ✅ should adjust brightness positively
  ✅ should adjust brightness negatively
  ✅ should combine multiple color adjustments
Asset Transformations - Comprehensive Test Suite › Resize Filters
  ✅ should apply nearest neighbor filter
  ✅ should apply bilinear filter
  ✅ should apply bicubic filter
  ✅ should apply Lanczos2 filter
  ✅ should apply Lanczos3 filter
Asset Transformations - Comprehensive Test Suite › Canvas Operations
  ✅ should create canvas with default settings
  ✅ should create canvas with aspect ratio
  ✅ should create canvas with region specification
  ✅ should create canvas with offset
Asset Transformations - Comprehensive Test Suite › Complex Transformation Chaining
  ✅ should chain multiple transformations for thumbnail generation
  ✅ should chain transformations for hero image optimization
  ✅ should chain transformations for artistic effect
Asset Transformations - Comprehensive Test Suite › URL Generation Edge Cases
  ✅ should handle empty transformation object
  ✅ should handle URL with existing query parameters
  ✅ should handle special characters in overlay URL
  ✅ should handle very long transformation chains
Asset Transformations - Comprehensive Test Suite › Method Chaining and Fluent Interface
  ✅ should return ImageTransform instance for method chaining
  ✅ should maintain transformation state across chained calls

✅ test/unit/asset.spec.ts

Asset class
  ✅ should add "locale" in _queryParams when locale method is called
  ✅ should add "include_dimension" in _queryParams when includeDimension method is called
  ✅ should add "include_branch" in _queryParams when includeBranch method is called
  ✅ should add "include_fallback" in _queryParams when includeFallback method is called
  ✅ should add "relative_urls" in _queryParams when relativeUrl method is called
  ✅ should add "version" in _queryParams when version method is called
  ✅ should add "fetch" in _queryParams when fetch method is called

✅ test/unit/base-query.spec.ts

BaseQuery class
  ✅ should add 'include_count' parameter to the query parameters
  ✅ should add 'asc' parameter with the specified key to the query parameters
  ✅ should add 'desc' parameter with the specified key to the query parameters
  ✅ should add 'limit' parameter with the specified key to the query parameters
  ✅ should add 'skip' parameter with the specified key to the query parameters
  ✅ should add the specified key-value pair to the query parameters
  ✅ should add all the key-value pairs from the specified object to the query parameters
  ✅ should remove a query parameter correctly
  ✅ should do nothing if the parameter does not exist

✅ test/unit/cache.spec.ts

Cache handleRequest function › NETWORK_ELSE_CACHE policy
  ✅ should return network response when proper response is received
  ✅ should return cache data when proper network response is not received
  ✅ should return error data when network response has error
Cache handleRequest function › CACHE_THEN_NETWORK policy
  ✅ should return cache response when proper cache is available then return network response
  ✅ should return api response when proper cache is not available
  ✅ should return error api response when data is not available in network or cache
Cache handleRequest function › CACHE_ELSE_NETWORK policy
  ✅ should return cache response when proper cache is available
  ✅ should return network response data when cache is not available
  ✅ should return error data when network response has error

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

Content Validation - Comprehensive Test Suite › Schema Validation
  ✅ should validate content type schema structure
  ✅ should validate field data types are supported
  ✅ should validate reference field configuration
  ✅ should validate file field configuration
  ✅ should validate rich text field configuration
Content Validation - Comprehensive Test Suite › Required Fields Validation
  ✅ should identify mandatory fields in schema
  ✅ should validate entry against mandatory field requirements
  ✅ should handle entries with missing mandatory fields
  ✅ should validate unique field constraints
  ✅ should validate multiple field constraints
Content Validation - Comprehensive Test Suite › Content Type Constraints
  ✅ should validate content type UID format
  ✅ should validate field UID format
  ✅ should validate content type title requirements
  ✅ should validate content type options
  ✅ should validate content type abilities
Content Validation - Comprehensive Test Suite › Rich Text Validation
  ✅ should validate rich text content structure
  ✅ should validate rich text field metadata
  ✅ should validate rich text HTML sanitization requirements
  ✅ should validate rich text character limits
Content Validation - Comprehensive Test Suite › Field Data Type Validation
  ✅ should validate text field constraints
  ✅ should validate number field constraints
  ✅ should validate boolean field constraints
  ✅ should validate date field format
  ✅ should validate email field format
  ✅ should validate reference field structure
  ✅ should validate file field structure
Content Validation - Comprehensive Test Suite › Query Validation
  ✅ should validate field UID in query operations
  ✅ should validate query operation types
  ✅ should validate regex patterns in queries
  ✅ should validate query value types
  ✅ should validate reference query operations
  ✅ should validate query operator combinations
Content Validation - Comprehensive Test Suite › Global Field Validation
  ✅ should validate global field schema inclusion
  ✅ should validate global field reference structure
Content Validation - Comprehensive Test Suite › Entry Field Selection Validation
  ✅ should validate only() field selection
  ✅ should validate except() field exclusion
  ✅ should validate reference inclusion
Content Validation - Comprehensive Test Suite › Content Validation Edge Cases
  ✅ should handle null and undefined values gracefully
  ✅ should validate content type without schema
  ✅ should handle malformed field metadata
  ✅ should validate deeply nested reference structures

✅ test/unit/contentstack.spec.ts

Contentstack
  ✅ should throw error when api key is empty
  ✅ should throw error when Delivery Token is empty
  ✅ should throw error when Environment is empty
  ✅ should create stack instance when the mandatory params are passed
  ✅ should create stack instance when the mandatory params are passed
  ✅ should set defaultHost, header and params when stack instance is created
  ✅ should change default host when host config is passed
  ✅ should change default host to AU when AU host config is passed
  ✅ should change the host when custom host config is passed
  ✅ should change default host to config host when region and host in config passed
  ✅ should change default host to US when US region in config is passed
  ✅ should change default host to EU when EU region in config is passed
  ✅ should change default host to AU when AU region in config is passed
  ✅ should change default host to azure-na when AZURE_NA region in config is passed
  ✅ should add logHandler
  ✅ should add plugins onRequest and onResponse as req and res interceptors when plugin is passed
Contentstack › getHostforRegion integration in stack creation
  ✅ should use getHostforRegion to set default hostname for aws_na region
  ✅ should use getHostforRegion to set default hostname for eu region
  ✅ should use getHostforRegion with custom host when both region and host are provided
  ✅ should use getHostforRegion for azure-na region
  ✅ should use getHostforRegion for gcp-na region
  ✅ should use getHostforRegion for gcp-eu region
  ✅ should handle getHostforRegion error gracefully
  ✅ should use getHostforRegion with undefined region when no region is provided

✅ test/unit/contenttype-query.spec.ts

ContentTypeQuery class
  ✅ should add "include_global_field_schema" in queryParams when includeGlobalFieldSchema method is called
  ✅ should return response data when successful

✅ test/unit/contenttype.spec.ts

ContentType class
  ✅ should allow to create a class object when contentTypeUid is passed
  ✅ should give Entry instance when entry method is called with entryUid
  ✅ should give Entries instance when entry method is called without entryUid
  ✅ should fetch the contentType response when fetch method is called

✅ test/unit/entries.spec.ts

Entries class
  ✅ should add "locale" in _queryParams when locale method is called
  ✅ should add "include_branch" in _queryParams when includeBranch method is called
  ✅ should set the include parameter to the given reference field UID
  ✅ should add "include_fallback" in _queryParams when includeFallback method is called
  ✅ should add "include_metadata" in _queryParams when includeMetadata method is called
  ✅ should add "include_embedded_items" in _queryParams when includeEmbeddedItems method is called
  ✅ should add "include_content_type" in _queryParams when includeContentType method is called
  ✅ should add "include_reference_content_type_uid" in _queryParams when includeReferenceContentTypeUID method is called
  ✅ should add "include_schema" in _queryParams when includeSchema method is called
  ✅ should return Query instance when query method is called
  ✅ should add a fieldUid to the _queryParams object
  ✅ should return an instance of Entries
  ✅ should allow chaining of multiple calls
  ✅ should add a fieldUid to the _queryParams object
  ✅ should return an instance of Entries
  ✅ should allow chaining of multiple calls
  ✅ should provide proper response when find method is called
  ✅ CT Taxonomy Query: Get entries with one term
  ✅ CT Taxonomy Query: Get entries with any term ($in)
  ✅ CT Taxonomy Query: Get entries with any term ($or)
  ✅ CT Taxonomy Query: Get entries with all term ($and)
  ✅ CT Taxonomy Query: Get entries with any taxonomy terms ($exists)
  ✅ CT Taxonomy Query: Get entries with taxonomy terms and also matching its children terms ($eq_below, level)
  ✅ CT Taxonomy Query: Get Entries With Taxonomy Terms Children's and Excluding the term itself ($below, level)
  ✅ CT Taxonomy Query: Get Entries With Taxonomy Terms and Also Matching Its Parent Term ($eq_above, level)
  ✅ CT Taxonomy Query: Get Entries With Taxonomy Terms Parent and Excluding the term itself ($above, level)
Variants test
  ✅ should get the correct variant headers added to client

✅ test/unit/entry-queryable.spec.ts

Query Operators API test cases
  ✅ should get entries which matches the fieldUid and values
  ✅ should get entries which does not match the fieldUid and values
  ✅ should get entries which does not match the fieldUid - notExists
  ✅ should get entries which matches the fieldUid - exists
  ✅ should return entries matching any of the conditions - or
  ✅ should return entry when both conditions are matching - and
  ✅ should return entry equal to the condition - equalTo
  ✅ should return entry equal to the condition - notEqualTo
  ✅ should return entry for referenceIn query
  ✅ should return entry for referenceNotIn query
  ✅ should return entry if tags are matching
  ✅ should search for the matching key and return the entry
  ✅ should sort entries in ascending order of the given fieldUID
  ✅ should sort entries in descending order of the given fieldUID
  ✅ should get entries which is lessThan the fieldUid and values
  ✅ should get entries which is lessThanOrEqualTo the fieldUid and values
  ✅ should get entries which is greaterThan the fieldUid and values
  ✅ should get entries which is greaterThanOrEqualTo the fieldUid and values

✅ test/unit/entry.spec.ts

Entry class
  ✅ should add "locale" in _queryParams when locale method is called
  ✅ should add "include_branch" in _queryParams when includeBranch method is called
  ✅ should add "include_fallback" in _queryParams when includeFallback method is called
  ✅ should set the include parameter to the given reference field UID
  ✅ should add "include_metadata" in _queryParams when includeMetadata method is called
  ✅ should add "include_embedded_items" in _queryParams when includeEmbeddedItems method is called
  ✅ should add "include_content_type" in _queryParams when includeContentType method is called
  ✅ should add a fieldUid to the _queryParams object
  ✅ should return an instance of Entry
  ✅ should allow chaining of multiple calls
  ✅ should add a fieldUid to the _queryParams object
  ✅ should return an instance of Entry
  ✅ should allow chaining of multiple calls
  ✅ should get the API response when fetch method is called
Variants test
  ✅ should get the correct variant headers added to client

✅ test/unit/global-field-query.spec.ts

GlobalFieldQuery class
  ✅ should add "include_branch" in queryParameter when includeBranch method is called
  ✅ should return response data when successful

✅ test/unit/global-field.spec.ts

GlobalField class
  ✅ should add "include_branch" in _queryParams when includeBranch method is called
  ✅ should add "fetch" in _queryParams when fetch method is called

✅ test/unit/image-transform.spec.ts

ImageTransform class
  ✅ should return empty object when ImageTransform object is created
  ✅ should return valid object with auto:webp when auto method is called without any param
  ✅ should return valid object when quality method is called with valid params
  ✅ should return valid object when format method is called with valid params
  ✅ should return valid object when resize method is called with valid params
  ✅ should return valid object when crop method is called with valid params
  ✅ should return valid object when fit method is called with valid params
  ✅ should return valid object when trim method is called with valid params
  ✅ should return valid object when orient method is called with valid params
  ✅ should return valid object when overlay method is called with valid params
  ✅ should return valid object when padding method is called with valid params
  ✅ should return valid object when bgColor method is called with valid params
  ✅ should return valid object when dpr method is called with valid params
  ✅ should return valid object when blur method is called with valid params
  ✅ should return valid object when frame method is called with valid params
  ✅ should return valid object when sharpen method is called with valid params
  ✅ should return valid object when saturation method is called with valid params
  ✅ should return valid object when contrast method is called with valid params
  ✅ should return valid object when brightness method is called with valid params
  ✅ should return valid object when resizeFilter method is called with valid params
  ✅ should return valid object when canvas method is called with valid params

✅ test/unit/live-preview.spec.ts

Live preview tests
  ✅ should check for values initialized
  ✅ should check host when live preview is enabled and management token is provided
  ✅ should check host when live preview is disabled and management token is provided
  ✅ should check host when live preview is enabled and preview token is provided
  ✅ should check host when live preview is disabled and preview token is provided

✅ test/unit/pagination.spec.ts

Pagination class
  ✅ should paginate the query with paginateObj skip and limit values when paginateObj is passed
  ✅ should change the skip value when next method is called
  ✅ should change the skip value when previous method is called

✅ test/unit/persistance/local-storage.spec.ts

local store
  ✅ should create store store
  ✅ should set item for key with value
  ✅ should not blank key
  ✅ should remove item for key
  ✅ should not throw on blank or not present key
  ✅ should update item for key
  ✅ should contain key value on removed another key
  ✅ should not contain key value clear
  ✅ should not contain key value clear

✅ test/unit/persistance/memory-storage.spec.ts

memory store
  ✅ should create store store
  ✅ should set item for key with value
  ✅ should not blank key
  ✅ should remove item for key
  ✅ should not throw on blank or not present key
  ✅ should update item for key
  ✅ should contain key value on removed another key
  ✅ should not contain key value clear
  ✅ should not contain key value clear

✅ test/unit/persistance/preference-store.spec.ts

persistence store initialization test
  ✅ should initialize default persistence
  ✅ should initialize persistance with name and local storage type
  ✅ should initialize persistance with name and memory storage type
  ✅ should initialize persistance with name and local storage type
  ✅ should throw error on custom storage without storage
persistance store init
  ✅ should set max age, serializer and deserializer
persistance functionality
  ✅ should set item for key with value
  ✅ should not blank key
  ✅ should remove item for key
  ✅ should not throw on blank or not present key
  ✅ should update item for key
  ✅ should contain key value on removed another key
  ✅ should return undefined on expiry
  ✅ should allow to set value undefined
  ✅ should not contain key value clear
persistance with namespace functionality
  ✅ should set item for key, value
  ✅ should remove item for key
  ✅ should update item for key
  ✅ should contain key value on removed another key
  ✅ should not contain key value clear
persistance with 0 maxAge
  ✅ should allow max age to be set to 0

✅ test/unit/plugin-comprehensive.spec.ts

Plugin Comprehensive Tests › ContentstackPlugin Interface › Interface Implementation
  ✅ should allow implementing the ContentstackPlugin interface with a class
  ✅ should allow implementing the ContentstackPlugin interface with an object
  ✅ should allow creating performance monitoring plugins
Plugin Comprehensive Tests › ContentstackPlugin Interface › Plugin Integration with Stack
  ✅ should accept typed plugins in stack configuration
  ✅ should handle multiple typed plugins
  ✅ should provide type safety for plugin method signatures
Plugin Comprehensive Tests › ContentstackPlugin Interface › Plugin Examples
  ✅ should demonstrate common plugin patterns
  ✅ should support advanced plugin patterns
Plugin Comprehensive Tests › ContentstackPlugin Export
  ✅ should export ContentstackPlugin interface from main package
  ✅ should provide TypeScript intellisense and type checking
  ✅ should allow plugin implementations to be used with stack configuration
Plugin Comprehensive Tests › Plugin Configuration Patterns
  ✅ should support configurable plugins
  ✅ should support plugin composition
Plugin Comprehensive Tests › Plugin Error Handling
  ✅ should handle plugins that throw errors gracefully
  ✅ should handle plugins with missing or invalid methods
  ✅ should handle plugins with different return types

✅ test/unit/plugin-interceptor-comprehensive.spec.ts

Plugin-Interceptor Comprehensive Tests › Interceptor Registration Order
  ✅ should register retry interceptors before plugin interceptors
  ✅ should handle empty plugins array
Plugin-Interceptor Comprehensive Tests › Plugin Error Handling Edge Cases
  ✅ should handle plugin throwing error in onRequest without breaking retry logic
  ✅ should handle plugin throwing error in onResponse
  ✅ should handle plugins with async operations
Plugin-Interceptor Comprehensive Tests › Plugin Mutation Edge Cases
  ✅ should handle plugin modifying retry-critical request properties
  ✅ should handle plugin modifying response before retry handler sees it
  ✅ should handle multiple plugins with conflicting modifications
Plugin-Interceptor Comprehensive Tests › Cache + Plugin + Retry Interaction
  ✅ should handle plugins with cache adapter and retry logic
  ✅ should handle plugins with different cache policies
Plugin-Interceptor Comprehensive Tests › Plugin Execution Flow
  ✅ should execute request interceptors in correct order: retry -> plugins
  ✅ should preserve retry count through plugin modifications
Plugin-Interceptor Comprehensive Tests › Plugin Type Safety Edge Cases
  ✅ should handle plugin with missing methods
  ✅ should handle plugins when retry is disabled
  ✅ should handle plugins with custom retry conditions
Plugin-Interceptor Comprehensive Tests › Plugin State Management
  ✅ should handle plugins that maintain internal state
  ✅ should handle plugins that modify config object
Plugin-Interceptor Comprehensive Tests › Performance and Scale Testing
  ✅ should handle large number of plugins efficiently
  ✅ should handle plugins with large data modifications
Plugin-Interceptor Comprehensive Tests › Plugin Configuration Edge Cases
  ✅ should handle plugins with different configuration combinations
  ✅ should handle real-world plugin scenarios

✅ test/unit/query-optimization-comprehensive.spec.ts

Query Optimization - Comprehensive Test Suite › Complex Query Building
  ✅ should build complex nested queries with multiple operators
  ✅ should handle complex OR operations with multiple conditions
  ✅ should handle complex AND operations with multiple conditions
  ✅ should build complex queries with mixed operators
  ✅ should handle deeply nested reference queries
  ✅ should optimize query with multiple reference constraints
Query Optimization - Comprehensive Test Suite › Parameter Validation
  ✅ should validate field UIDs for alphanumeric characters
  ✅ should validate regex patterns for safety
  ✅ should validate containedIn values for proper types
  ✅ should validate reference UIDs for whereIn operations
  ✅ should validate value types for comparison operations
  ✅ should validate search key for typeahead
Query Optimization - Comprehensive Test Suite › Query Parameter Optimization
  ✅ should optimize query parameters for minimal payload
  ✅ should handle parameter merging for complex queries
  ✅ should optimize chained query operations
  ✅ should handle query parameter encoding efficiently
  ✅ should optimize query params vs parameters separation
Query Optimization - Comprehensive Test Suite › Performance Profiling
  ✅ should handle large query parameter sets efficiently
  ✅ should optimize memory usage for complex nested queries
  ✅ should benchmark query building performance
  ✅ should handle concurrent query operations efficiently
  ✅ should optimize query serialization performance
Query Optimization - Comprehensive Test Suite › Query Result Caching Optimization
  ✅ should generate consistent cache keys for identical queries
  ✅ should handle cache key generation for complex queries
  ✅ should optimize cache invalidation patterns
  ✅ should handle cache efficiency for reference queries
Query Optimization - Comprehensive Test Suite › Query Optimization Strategies
  ✅ should optimize query structure for database efficiency
  ✅ should optimize field selection for minimal data transfer
  ✅ should handle query complexity scoring
  ✅ should optimize query execution order
  ✅ should handle query result pagination optimization
Query Optimization - Comprehensive Test Suite › Advanced Query Patterns
  ✅ should handle geographic and spatial queries
  ✅ should optimize date range queries
  ✅ should handle full-text search optimization
  ✅ should optimize taxonomy and categorization queries
  ✅ should handle multi-language content optimization
  ✅ should optimize content versioning queries

✅ test/unit/query.spec.ts

Query class
  ✅ should set a parameter correctly
  ✅ should add an equality parameter to _parameters when queryOperation is EQUALS
  ✅ should add a parameter with the correct queryOperation to _parameters when queryOperation is not EQUALS
  ✅ should allow chaining of where method calls
  ✅ should add a where-in filter to the query parameters
  ✅ should add a where-not-in filter to the query parameters
  ✅ should add a query operator to the query parameters
  ✅ should result in error when regex method is called with invalid regex
  ✅ should add a regex parameter to _parameters when regex method is called with valid regex
  ✅ should add a containedIn parameter to _parameters
  ✅ should add a notContainedIn parameter to _parameters
  ✅ should add an exists parameter to _parameters
  ✅ should add a notExists parameter to _parameters
  ✅ should add an equalTo parameter to _parameters
  ✅ should add a notEqualTo parameter to _parameters
  ✅ should add a lessThan parameter to _parameters
  ✅ should add a lessThanOrEqualTo parameter to _parameters
  ✅ should add a greaterThan parameter to _parameters
  ✅ should add a greaterThanOrEqualTo parameter to _parameters
  ✅ should add a tags parameter to _parameters
  ✅ should add a search parameter to _queryParams
  ✅ should provide proper response when find method is called
  ✅ should provide proper response when find method is called

✅ test/unit/retry-configuration.spec.ts

Retry Configuration › Default Retry Configuration
  ✅ should use default retry settings when not specified
  ✅ should have retry interceptors configured
Retry Configuration › Custom Retry Configuration
  ✅ should accept custom retryLimit configuration
  ✅ should accept custom retryDelay configuration
  ✅ should accept both retryLimit and retryDelay configuration
  ✅ should accept retryOnError configuration
  ✅ should accept custom retryCondition function
Retry Configuration › Retry Configuration Integration
  ✅ should pass retry configuration to the http client
  ✅ should maintain retry configuration in stackConfig property
Retry Configuration › Retry Configuration Verification
  ✅ should verify retry interceptors are configured when retryLimit is set
  ✅ should verify retry configuration is accessible through stackConfig
  ✅ should verify retry settings are passed to httpClient configuration
Retry Configuration › Edge Cases
  ✅ should handle zero retryLimit
  ✅ should handle zero retryDelay
  ✅ should handle large retry values

✅ test/unit/stack.spec.ts

Stack class tests
  ✅ should test import of class Stack
  ✅ should return Asset instance when asset function is called with stack obj
  ✅ should return ContentType instance when contentType function is called with stack obj
  ✅ should set the correct locale when setLocale function is called with proper locale param
  ✅ should return the syncMock value when sync is called
  ✅ should set live preview parameters correctly when live_preview is true
  ✅ should set live preview parameters to null when live_preview is false
  ✅ should set release_id header when release_id is present in query
  ✅ should delete release_id header when release_id is not present in query
  ✅ should set preview_timestamp header when preview_timestamp is present in query
  ✅ should delete preview_timestamp header when preview_timestamp is not present in query
  ✅ should return last activities
  ✅ should set port to 3000
Stack class tests › setHost method integration tests
  ✅ should set baseURL correctly for aws_na region
  ✅ should set baseURL correctly for eu region
  ✅ should set baseURL correctly for au region
  ✅ should set baseURL correctly for azure-na region
  ✅ should set baseURL correctly for gcp-na region
  ✅ should set baseURL correctly for gcp-eu region
  ✅ should prioritize custom host over region
  ✅ should handle case insensitive regions
  ✅ should use default region when no region provided
  ✅ should throw error for invalid region
  ✅ should handle region aliases correctly

✅ test/unit/string-extensions.spec.ts

String Extension
  ✅ should return correct string value

✅ test/unit/sync-operations-comprehensive.spec.ts

Comprehensive Sync Operations Tests › Basic Sync Operations
  ✅ should initialize sync successfully
  ✅ should handle sync with content type filter
  ✅ should handle sync with start date
  ✅ should handle pagination continuation
Comprehensive Sync Operations Tests › Delta Sync Operations
  ✅ should perform delta sync with sync token
  ✅ should handle empty delta sync response
  ✅ should handle mixed entry types in delta sync
Comprehensive Sync Operations Tests › Sync Error Handling
  ✅ should handle sync token expiration
  ✅ should handle network errors
  ✅ should handle invalid parameters
  ✅ should handle server errors
Comprehensive Sync Operations Tests › Sync Performance and Optimization
  ✅ should handle large dataset efficiently
  ✅ should optimize for specific content types
Comprehensive Sync Operations Tests › Sync Data Consistency
  ✅ should maintain data consistency
  ✅ should handle sync token validation
  ✅ should handle malformed responses gracefully

✅ test/unit/synchronization.spec.ts

Synchronization function
  ✅ should have valid init and environment params as req params when no request params is passed
  ✅ should have only pagination_token param when sync is called with pagination_token.
  ✅ should have only sync_token param when sync is called with sync_token.
  ✅ should have valid content_type_uid when content_type_uid is passed as param
  ✅ should have valid locale when a locale is passed as param
  ✅ should have valid date structure and other required params when start_date is passed as param
  ✅ should have valid publish_type when type is passed as param
  ✅ should have all the passed params when multiple params are passed
  ✅ should return pagination_token when a batch of updates are fetched
  ✅ should return sync_token when all the updates are fetched

✅ test/unit/taxonomy-query.spec.ts

Taxonomy-query class
  ✅ Taxonomy Query: Get entries with one term
  ✅ Taxonomy Query: Get entries with any term ($in)
  ✅ Taxonomy Query: Get entries with any term ($or)
  ✅ Taxonomy Query: Get entries with all term ($and)
  ✅ Taxonomy Query: Get entries with any taxonomy terms ($exists)
  ✅ Taxonomy Query: Get entries with taxonomy terms and also matching its children terms ($eq_below, level)
  ✅ Taxonomy Query: Get Entries With Taxonomy Terms Children's and Excluding the term itself ($below, level)
  ✅ Taxonomy Query: Get Entries With Taxonomy Terms and Also Matching Its Parent Term ($eq_above, level)
  ✅ Taxonomy Query: Get Entries With Taxonomy Terms Parent and Excluding the term itself ($above, level)
  ✅ Taxonomy Query: Get All Entries With Taxonomy For One Content type
  ✅ Taxonomy Query: Get All Entries With Taxonomy For Multiple Content types

✅ test/unit/utils.spec.ts

Utils functions › getHostforRegion function
  ✅ should return custom host when provided
  ✅ should return default host for aws_na region
  ✅ should return default host when no region is provided
  ✅ should return correct host for eu region
  ✅ should return correct host for aws_eu region
  ✅ should return correct host for aws-eu region
  ✅ should return correct host for au region
  ✅ should return correct host for aws_au region
  ✅ should return correct host for aws-au region
  ✅ should return correct host for azure-na region
  ✅ should return correct host for azure_na region
  ✅ should return correct host for gcp-na region
  ✅ should return correct host for gcp_na region
  ✅ should return correct host for gcp-eu region
  ✅ should return correct host for gcp_eu region
  ✅ should handle case insensitive region names
  ✅ should handle mixed case region names
  ✅ should throw error for invalid region
  ✅ should throw error for empty string region
  ✅ should throw error for null region
  ✅ should return default host when undefined region is explicitly passed
  ✅ should throw error for non-string region types
  ✅ should prioritize custom host over region
  ✅ should handle region aliases correctly
  ✅ should strip protocol from content delivery endpoint
  ✅ should handle azure-eu region
  ✅ should handle azure_eu region
Utils functions › encodeQueryParams function
  ✅ should encode special characters in strings
  ✅ should handle nested objects recursively
  ✅ should preserve non-string primitive values
  ✅ should handle arrays correctly
  ✅ should handle empty objects and special values