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: test update command's handler correctly #5457

Merged
merged 3 commits into from Oct 5, 2022

Conversation

Shinyaigeek
Copy link
Member

Fixes: #5410

currently, update command's test cannot verify update command because update command works as recursive with workspaceDir and dir args but current test implementation passes both of workspaceDir and dir args into update command's handler. FYI: https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-installation/src/installDeps.ts#L128-L130

I fix this by removing workspaceDir args from update command's handler in update test

@Shinyaigeek
Copy link
Member Author

https://github.com/pnpm/pnpm/blob/main/packages/plugin-commands-installation/test/update/update.ts#L97

I did not remove this line workspaceDir arg because this test verify update command's handler behavior with workspace arg, and this throwing behavior when both latest and workspace are true, whcih is tested in this test, should be tested in update command test because this error is throwen before update invoke recursive

"@pnpm/plugin-commands-installation": patch
---

Remove workspaceDir args from update handler in the test because update command works as recursive with both of workspaceDir arg and dir arg"
Copy link
Member

Choose a reason for hiding this comment

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

there is no need in a changeset file when you only change tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I did not know that. removed in 3964007 👍

@zkochan zkochan merged commit d101eb0 into pnpm:main Oct 5, 2022
@Shinyaigeek Shinyaigeek deleted the chore/fix-flaky-update-command-test branch October 6, 2022 05:53
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.

pnpm update command test runs with recursive mode unexpectedly
2 participants