-
Notifications
You must be signed in to change notification settings - Fork 72
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 tests after removing 2.x in workspace #405
Conversation
@@ -74,10 +73,7 @@ describe('loopback:remote-method generator', function() { | |||
}).then(function() { | |||
var definition = common.readJsonSync('common/models/car.json'); | |||
var methods = definition.methods || {}; | |||
expect(methods).to.have.property('myRemote'); |
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.
Reading from this docs page: https://loopback.io/doc/en/lb3/3.0-Release-Notes.html#name-indicates-whether-method-is-static, I think this line and the line below are no longer true. But I'm not 100% sure.
@bajtos @jannyHou @hacksparrow, I'd like to get your inputs on this. If this is true, perhaps we need to change the test name as well.
Test name method name with 'prototype.' should be removed
-> method name with 'prototype.' should not removed
?
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.
Your fix looks correct to me 👍 I agree to update the test name to match the actual assertions.
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.
@dhmlau Fair enough 💯
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.
@dhmlau The travis test has 18 failures, I would suggest fixing them from removing the option loopbackVersion
:
generator-loopback/app/index.js
Line 51 in 2241fa0
this.option('loopbackVersion', { |
And its related code.
I've discussed with @jannyHou about removing the prompt for |
From what I remember, APIC used to have it's own version prompt, because they want to use a different default version (2.x) than the one offered by |
Installed the latest
|
@dhmlau I remember I removed the loopback version prompt in APIC v5. Let me double check. |
Yes it's removed in apic, see https://github.ibm.com/apimesh/apiconnect-cli-loopback/blob/master/lib/app-prompt.js#L65 the version can only be |
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.
LGTM 👍
Will submit a PR in loopback-cli to fix the CI failure. |
Description
After the PR strongloop/loopback-workspace#549 to remove LB2.x version in the loopback-workspace, there are a few tests failure.
The major changes are in the
remote-method.test.js
. Following what @bajtos provided in this comment strongloop/loopback-workspace#549 (comment), I've made the changes in this repo accordingly.Related issues
Checklist
guide