Skip to content

test: make island CSS rewrite tests cross-platform - #73

Merged
Brooooooklyn merged 3 commits into
mainfrom
04-03-fix_make_island_css_rewrite_tests_cross-platform
Apr 3, 2026
Merged

Brooooooklyn merged 3 commits into
mainfrom
04-03-fix_make_island_css_rewrite_tests_cross-platform

Conversation

@shulaoda

@shulaoda shulaoda commented Apr 3, 2026

Copy link
Copy Markdown
Member

Fixes the 3 failing tests on Windows CI (actions/runs/23934859867).

Summary

  • Fix island-css-rewrite unit tests failing on windows-latest CI due to hardcoded POSIX absolute paths in assertions
  • On Windows, path.resolve("/project/...") prepends the current drive letter (e.g. D:/project/...), causing the 3 relative-to-absolute CSS rewrite assertions to mismatch
  • Introduce a p() helper that normalizes test paths through resolve + normalizePath, so expectations are platform-correct on both Unix and Windows without changing the source implementation

Test plan

  • pnpm test packages/void/test/unit/island-css-rewrite.test.ts — all 6 tests pass on Windows
  • Verify tests still pass on Unix/macOS CI

@shulaoda
shulaoda marked this pull request as draft April 3, 2026 05:38
@shulaoda shulaoda changed the title 04 03 fix make island css rewrite tests cross platform test: make island CSS rewrite tests cross-platform Apr 3, 2026
@shulaoda
shulaoda marked this pull request as ready for review April 3, 2026 05:56
@Brooooooklyn
Brooooooklyn merged commit 8ffab0f into main Apr 3, 2026
6 checks passed
@Brooooooklyn
Brooooooklyn deleted the 04-03-fix_make_island_css_rewrite_tests_cross-platform branch April 3, 2026 06:33
cpojer added a commit that referenced this pull request Sep 11, 2026
cpojer added a commit that referenced this pull request Sep 28, 2026
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.

2 participants