Skip to content

Conversation

jerome3o-anthropic
Copy link
Member

Summary

  • Fixed Jest configuration and test files to properly work with ES modules and TypeScript
  • All tests now pass successfully

Changes

  • Updated Jest configuration to use ts-jest ESM preset with proper settings
  • Added NODE_OPTIONS=--experimental-vm-modules flag to test script for ESM support
  • Fixed import statements in all test files to properly import Jest globals
  • Rewrote provider.test.ts to work with ESM limitations (using actual implementations with mock Redis instead of module mocking)
  • Fixed test expectations to match actual implementation (e.g., state= instead of metadata= in URLs)
  • Fixed encryption key generation in tests to use proper 64-character hex tokens
  • Standardized token_type to "Bearer" across the codebase for consistency
  • Removed unused imports to fix lint errors
  • Excluded scratch folder from test runs

Test Results

All tests pass:

Test Suites: 3 passed, 3 total
Tests:       43 passed, 43 total

Build and lint also pass successfully.

🤖 Generated with Claude Code

- Updated Jest configuration to use ts-jest ESM preset
- Added NODE_OPTIONS flag for experimental VM modules support
- Fixed import statements in all test files to import Jest globals
- Rewrote provider.test.ts to work with ESM (using actual implementations with mock Redis)
- Fixed test expectations to match actual implementation
- Fixed encryption key generation in tests (using proper 64-char hex tokens)
- Standardized token_type to "Bearer" across codebase
- Removed unused imports to fix lint errors
- Excluded scratch folder from test runs

All tests now pass successfully with proper ES module support.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Relocked
@jerome3o-anthropic jerome3o-anthropic merged commit 7633274 into main May 20, 2025
2 checks passed
@jerome3o-anthropic jerome3o-anthropic deleted the jerome/fix/tests branch June 4, 2025 12:36
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.

1 participant