-
-
Notifications
You must be signed in to change notification settings - Fork 197
Fix add plugin unit test #780
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
Conversation
✅ |
assert.deepEqual(actualDependencies, expectedDependencies); | ||
let expectedDependencies = { "plugin1": "^1.0.3" }; | ||
let expectedDependenciesExact = { "plugin1": "1.0.3" }; | ||
assert.isTrue(_.isEqual(actualDependencies, expectedDependencies) || _.isEqual(actualDependencies, expectedDependenciesExact)); |
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.
Can we use deepEqual
here?
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.
_.isEqual compares deeply
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.
so we consider both syntax are correct (^1.0.3
and 1.0.3
) ?
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.
Yes, I have updated PR description.
👍 after rebasing on master |
09c560b
to
b14d4b7
Compare
✅ |
|
||
let commandsService = testInjector.resolve(CommandsServiceLib.CommandsService); | ||
commandsService.tryExecuteCommand("plugin|add", [pluginName+"@1.0.0"]).wait(); | ||
pluginsService.add(pluginName+"@1.0.0").wait(); |
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.
or maybe ${pluginName}@1.0.0
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.
We agreed to leave the code as is.
Small code cleanups
b14d4b7
to
07bf8d9
Compare
✅ |
👍 |
Npm has a global configuration to save dependencies with exact versions or as ^ ones. This unit test must work in both configurations. Therefore, we check for one of the two possible outcomes.
Also, small code cleanups.