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

Reduce unit test flakiness - part 2 #72

Closed
4 of 5 tasks
matejchalk opened this issue Sep 25, 2023 · 0 comments · Fixed by #74
Closed
4 of 5 tasks

Reduce unit test flakiness - part 2 #72

matejchalk opened this issue Sep 25, 2023 · 0 comments · Fixed by #74
Assignees

Comments

@matejchalk
Copy link
Collaborator

matejchalk commented Sep 25, 2023

  • remove NPM workspaces to make tests indepedent of build
  • use await expect(() => ...).rejects.toThrowError() instead of error spies with .catch (improves test failure messages)
  • use node -e "require('fs').writeFileSync(..., ...)" instead of bash -c echo ... > ... (platform-indepedence)
  • use memfs for testing persist logic (see persist.spec.ts) with different formats (instead of real file-system) - see vitest-memfs-poc branch
  • mock process.exit in Yargs tests

Refactor: Platform-independant plugin runner

Image

Refactor: Testing errors

Image

@matejchalk matejchalk self-assigned this Sep 27, 2023
@vmasek vmasek added this to the MVP milestone Oct 6, 2023
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 a pull request may close this issue.

2 participants