Fix tests to work with ES modules and TypeScript#1
Merged
jerome3o-anthropic merged 1 commit intomainfrom May 20, 2025
Merged
Conversation
- 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 <noreply@anthropic.com> Relocked
5628a7b to
23938ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
ts-jestESM preset with proper settingsNODE_OPTIONS=--experimental-vm-modulesflag to test script for ESM supportprovider.test.tsto work with ESM limitations (using actual implementations with mock Redis instead of module mocking)state=instead ofmetadata=in URLs)token_typeto"Bearer"across the codebase for consistencyTest Results
All tests pass:
Build and lint also pass successfully.
🤖 Generated with Claude Code