+
Skip to content

Conversation

st3h3n
Copy link
Contributor

@st3h3n st3h3n commented Aug 29, 2025

PR Checklist

On Windows generated paths are ./app.component.css|C:/path/to/src/app.component.css rather than ./app.component.css|/path/to/src/app.component.css, causing tests to fail. Trying to understand where this issue is coming from, I found some older PRs (#275 and #799), that tried to utilize vite's normalizePath(), which used to also take care of Windows' drive letters, though that was ages ago.

Closes #1860

What is the new behavior?

  1. ./app.component.css|/path/to/src/app.component.css now properly maps to ./app.component.css|/path/to/src/app.component.css.
  2. I changed the helper function into a proper matcher, making it easier in the future to see what the problem is:
// Previously
Expected: true
Received: false

// Now (roughly)
- Expected
+ Received
[
  -./app.component.css|/path/to/src/app.component.css
  +./app.component.css|C:/path/to/src/app.component.css
]
  1. Removed redundant .replace(/\\/g, '/') which is already taken care of by normalizePath().
  2. Changed nomenclature in test to reflect typical test nomenclature, reducing ambiguity. E.g. actualPaths -> expectedPaths because actual actual paths 😏 are generated by the resolver.

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 7cefca4
🔍 Latest deploy log https://app.netlify.com/projects/analog-docs/deploys/68b2071389ba8900082b7119
😎 Deploy Preview https://deploy-preview-1861--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 7cefca4
🔍 Latest deploy log https://app.netlify.com/projects/analog-blog/deploys/68b2071330f63c00084c04f1
😎 Deploy Preview https://deploy-preview-1861--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 7cefca4
🔍 Latest deploy log https://app.netlify.com/projects/analog-app/deploys/68b2071380cd2d0009d962e0
😎 Deploy Preview https://deploy-preview-1861--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for analog-ng-app ready!

Name Link
🔨 Latest commit 7cefca4
🔍 Latest deploy log https://app.netlify.com/projects/analog-ng-app/deploys/68b207134e89d20008fd78de
😎 Deploy Preview https://deploy-preview-1861--analog-ng-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@brandonroberts
Copy link
Member

Thanks @st3h3n. This is just fixing the tests so you can run them for this repo on Windows?

@st3h3n
Copy link
Contributor Author

st3h3n commented Aug 29, 2025

Yea, I tried implementing the PR for #1847 but couldn't run the tests successfully before even touching anything. This fixes that. I also made some imrovements as mentioned above.

@brandonroberts brandonroberts merged commit 18899da into analogjs:beta Aug 29, 2025
22 checks passed
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.

Errors when running tests on Windows

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载