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(testing): fix tests for Windows #165

Merged
merged 8 commits into from
Oct 27, 2023
Merged

fix(testing): fix tests for Windows #165

merged 8 commits into from
Oct 27, 2023

Conversation

Tlacenka
Copy link
Collaborator

In this PR, I identified and fixed various issue while running tests in the Windows environment:

  • shell needs to be specified to run programs in command shell on Windows, as described here
  • path notation on Windows is different
  • JSON formatting is different for UNIX and Windows
  • writing into files replaced by echo command which works seamlessly on Windows
  • glob patterns require extra quotation marks for argument expansion on Linux
  • recreating tmp folder caused issues for me so I partially fixed it via adding the recursive option

Note: This is the same scope as #131. Unfortunately, merging changes from the test refactor did not go well so I started off a clean branch and re-applied the changes.

Copy link
Collaborator

@matejchalk matejchalk left a comment

Choose a reason for hiding this comment

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

Well done and thanks for sticking with it 😅 Great that the ESLint plugin will now work on Windows, too 👍

packages/cli/code-pushup.config.mock.ts Outdated Show resolved Hide resolved
packages/models/test/fixtures/file-write-runner-config.ts Outdated Show resolved Hide resolved
packages/plugin-eslint/src/lib/runner/lint.ts Outdated Show resolved Hide resolved
@Tlacenka Tlacenka merged commit b80255b into main Oct 27, 2023
6 checks passed
@Tlacenka Tlacenka deleted the fix-windows-attempt-2 branch October 27, 2023 12:47
@BioPhoton
Copy link
Collaborator

I thought so that the last big test refactoring will break any other one related to testing.

Happy you made it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔬 testing writing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants