-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: describe how to tests services #1445
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
| #### Obtain a Service Proxy instance | ||
|
|
||
| In | ||
| [./Calling-other-APIs-and-Web-Services.md#make-service-proxies-easier-to-test], |
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.
Broken link 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.
Oops, I forgot to commit and push fixes I made after I run Jekyll to render the updates. PTAL at 786ae96
jannyHou
left a comment
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 👍 Nice doc for testing services, I think it can also gives #1396 some hint.
| protected datasource: juggler.DataSource = new GeocoderDataSource(), | ||
| ) {} | ||
|
|
||
| value(): GeocoderService { |
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.
nitpick: is getService a function provided by us or user defines it in the provider?
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.
Good catch! getService is coming from @loopback/service-proxy package, see http://apidocs.loopback.io/@loopback%2fdocs/service-proxy.html#9.
I'll add an explicit import to the code snippet.
786ae96 to
c33b8df
Compare
UpdateTesting-your-application and Calling-other-APIs-and-web-services to describe how to test service proxies.
This task is a part of #1311, see also #1441 which is updating Todo tutorial with similar changes.
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated