Open
Description
Several tests are failing on Windows due to inconsistent handling of path separators and line endings. The main issues are:
- Path Separator Issues:
- URL paths using Windows backslashes instead of forward slashes
- Inconsistent path comparison in tests between Windows and Unix systems
- Import map paths not normalized across platforms
- Line Ending Issues:
- Test comparisons failing due to \r\n vs \n differences
- SQL statement comparisons affected by platform-specific line endings
- Form data comparisons failing due to line ending mismatches
- Test Data Handling:
- File system operations not properly handling cross-platform paths
- Test fixtures using hardcoded path separators
Affected areas:
- Function deployment tests
- Storage operations
- Migration tests
- Config parsing tests
- Token parsing tests
Proposed Solution:
- Add consistent path normalization using filepath.ToSlash/FromSlash
- Normalize line endings in test comparisons
- Use platform-agnostic path handling for URLs
- Add helper functions for consistent line ending handling
- Replace testImports with in-memory filesystem for better control
This will improve test reliability across different operating systems and prevent platform-specific test failures.
Metadata
Metadata
Assignees
Labels
No labels