-
-
Notifications
You must be signed in to change notification settings - Fork 13
fix: remove dependencies bug #25
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: remove dependencies bug #25
Conversation
|
Can you add tests for the |
added |
|
It would be better to add a new test than modify existing tests. |
|
test/remove-dependencies.js
Outdated
| packageJson = await readPackage({cwd: temporary, normalize: false}); | ||
|
|
||
| t.deepEqual(packageJson, omit(fixture, ['dependencies', 'devDependencies.bar'])); | ||
| t.deepEqual(packageJson, pick(fixture, ['name'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels simpler to just do this:
| t.deepEqual(packageJson, pick(fixture, ['name'])); | |
| t.deepEqual(packageJson, {name: fixture.name})); |
|
The test already does too much. Large tests often hide bugs since they do too much. Not a big issue in this case, but having smaller tests would make it clearer. I guess that could be done later though. |
yes, it will be better, i've already add a new case |
Fixes #23