-
Notifications
You must be signed in to change notification settings - Fork 364
Description
Bug Description
The memAgent test should handle case-insensitive environment variable names fails on Windows environments.
The test should handle case-insensitive environment variable names in src/core/brain/memAgent/__test__/loader.test.ts fails on Windows due to environment variable case sensitivity differences. On Windows, environment variable names are case-insensitive, while on Unix-like systems they are case-sensitive. This causes the test to expect "lowercase" but receive "uppercase" on Windows.
Steps to Reproduce
Steps to reproduce the behavior:
- Run the test suite on a Windows machine.
- Observe the failure in should handle case-insensitive environment variable names in loader.test.ts.
Expected Behavior
The test should pass on all platforms, regardless of environment variable case sensitivity.
Actual Behavior
On Windows, the test fails with:
AssertionError: expected 'uppercase' to be 'lowercase' // Object.is equality
Expected: "lowercase"
Received: "uppercase"
Screenshots
N/A
Environment Information
OS: Windows 11
Browser: N/A
Version: 0.3.0
Node.js version: v24.5.0
Logs and Error Messages
Please provide any relevant logs, error messages, or console output:
FAIL src/core/brain/memAgent/__test__/loader.test.ts > Loader > Environment Variable Expansion > should handle case-insensitive environment variable names
AssertionError: expected 'uppercase' to be 'lowercase' // Object.is equality
Expected: "lowercase"
Received: "uppercase"
Additional Context
Does this test actually make sense on platforms with case-insensitive environment variables (e.g., Windows)?
Possible Solution
- Update the test to skip or adjust its expectations on platforms where environment variables are case-insensitive (such as Windows).
- Alternatively, refactor the loader logic to normalize environment variable keys for cross-platform compatibility.
- Or, document that this behavior is platform-dependent and exclude the test from Windows runs.
Checklist
- I have searched for similar issues before creating this one
- I have provided all the requested information above
- I have tested this on the latest version