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

chore: fixes tests on Windows using Unix-style path #1420

Merged
merged 3 commits into from Oct 1, 2022
Merged

chore: fixes tests on Windows using Unix-style path #1420

merged 3 commits into from Oct 1, 2022

Conversation

kleinfreund
Copy link
Contributor

Description

I noticed that tests weren't passing on Windows and went ahead and fixed them. All unit and integration tests are now passing on Windows, too.

Note: This also contains a controversial change to the commitlint.config.js which removes the line length limitations from commit bodies. I've made that change because I wasn't able to commit. Of course this isn't my repository so I'm happily removing this change if it's unwanted. However, I'd like to take this opportunity to argue against such rules: Nowadays, there just isn't a good reason for hard-wrapping code or natural language content (which I believe is the main reason these rules exist). Editors have capabilities to soft-wrap as a user likes per file type/language. Additionally, I've come to really like writing up a commit's changes in ... the commit itself. This saves from needing to do so in two places: the commit and the inadvertent pull/merge request.

In any case, this is not for me to decide, so please let me know whether I should be reverting this.

Changes

Fixes a test passing a Unix-style path to child_process.exec which failed on Windows by wrapping it in path.resolve.

Fixes a test relying on some internal logic which only took Unix-style paths into account.

Changes the commitlint configuration to allow commit bodies of any length.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 30, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bdc9f7a:

Sandbox Source
MSW React Configuration

kleinfreund and others added 3 commits October 1, 2022 14:43
Changes the commitlint configuration to allow commit bodies of any length.
Fixes a test passing a Unix-style path to child_process.exec which failed on Windows by wrapping it in `path.resolve`.

Fixes a test relying on some internal logic which only took Unix-style paths into account.
Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the tests better! Welcome to contributors, @kleinfreund! 🎉

@kettanaito kettanaito merged commit dae755d into mswjs:main Oct 1, 2022
@kleinfreund kleinfreund deleted the chore/fix-tests-on-windows branch October 2, 2022 07:26
@kettanaito
Copy link
Member

Released: v0.47.4 🎉

This has been released in v0.47.4!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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.

None yet

2 participants