Skip to content

Conversation

@AniketDev7
Copy link
Contributor

Updated comprehensive test cases with latest development code

- Fix all failing test suites (632 tests now passing)
- Add 21 new comprehensive test suites covering:
  * Asset management, cache & persistence
  * Complex queries, deep references, field projections
  * Global fields, JSON RTE, live preview
  * Metadata, modular blocks, multi-reference
  * Pagination, performance benchmarks
  * Query encoding, operators, sync operations
  * Taxonomy queries

- Fix TypeScript errors (TS18048, TS2304, TS2554, TS1128, TS1005)
- Fix Axios errors (422, 400) with graceful error handling
- Fix circular references in deep reference chains (WeakSet tracking)
- Fix flaky performance tests (network variance handling)
- Add global console.error suppression for SDK validation (jest.setup.ts)
- Remove redundant synchronization.spec.ts (superseded by comprehensive version)
- Update .gitignore to exclude build artifacts
- Sync with latest development (19 commits)
- Remove @nrwl/jest dependency (from upstream)

Test Results:
  Test Suites: 39 passed, 39 total (100%)
  Tests: 632 passed, 632 total (100%)
  Status: Production Ready

Breaking Changes: None
Security: All credentials use environment variables
- Add browser environment test suite (jsdom)
  * Import validation tests
  * Initialization tests with real .env credentials
  * Dependency safety checks (catches fs/path/crypto usage)
  * Real API call tests using existing .env

- Add bundle validation scripts
  * validate-browser-safe.js: Scans bundles for Node.js-only APIs
  * test-bundlers.js: Validates bundler compatibility

- Add test configurations
  * jest.config.browser.ts: Browser environment Jest config
  * jest.setup.browser.ts: Browser test setup
  * playwright.config.ts: Real browser testing (structure)

- Update package.json with new npm scripts
  * test:browser: Run browser environment tests
  * test:all: Run all tests (unit + api + browser)
  * validate:browser: Validate bundle safety
  * validate:bundlers: Test bundler compatibility

- Update .gitignore
  * Add .env to prevent credential leaks
  * Adjust docs/ pattern

This implements AWS SDK v3-style multi-environment testing to catch
Node.js-only API usage (fs, path, crypto) before production, preventing
customer build failures in browser environments.
- Add browser environment testing with Playwright
- Add bundler compatibility tests (Webpack, Vite, Next.js, Rollup, esbuild)
- Add unified test reporting for CI/CD integration
- Update test configurations and dependencies
- Add documentation for new testing approach
- Sync with development branch (error-messages.ts, security fixes)
- Add Jest globals imports to all test/api files
- Fix error handling patterns (error.status vs error.response.status)
- Fix test data alignment (entry/content type matching)
- Remove invalid asset query test
- Fix npm audit vulnerabilities (0 remaining)
…porting

- Added console log capture in Jest reports with JSON output.
- Improved global fields tests to reflect changes in field names and added nested global field schema tests.
- Enhanced HTML report generation to include console logs and improved styling for better readability.
@AniketDev7 AniketDev7 requested a review from a team as a code owner January 16, 2026 09:15
@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
99.14% (+0.21% 🔼)
925/933
🟢 Branches
97.12% (+0.64% 🔼)
303/312
🟢 Functions
97.99% (+1.01% 🔼)
195/199
🟢 Lines
99.33% (+0.22% 🔼)
893/899

Test suite run success

657 tests passing in 34 suites.

Report generated by 🧪jest coverage report action from 2581b47

Copy link
Contributor

@harshithad0703 harshithad0703 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants