Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: windows compatible unit tests #69

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

tlaukkanen
Copy link
Contributor

This pull request includes changes to improve cross-platform compatibility and refactor file handling in the test suite. The most significant changes include adding platform-specific newline characters, refactoring path handling (path.join(...) handles the folder separator characters), and updating readFile import statement so that vi.mock('fs/promises'... works on Windows too.

Tested the changes by running npm test with both Windows (GitBash terminal) and on Linux via WSL.

Windows:
image

Linux (via WSL):
image

@tlaukkanen
Copy link
Contributor Author

Additionally I think this will also fix the isValidProject outcome on Windows as previously it was causing this while loop to run continuosly in getDependencyFile in case it didn't find any dependency files. So, this should help with issues like #65 and #43

@steve8708
Copy link
Contributor

thanks @tlaukkanen !

@steve8708 steve8708 merged commit 6507a8b into BuilderIO:main Oct 22, 2024
2 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.

2 participants