Skip to content

Conversation

@bajtos
Copy link
Member

@bajtos bajtos commented Jun 21, 2018

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 test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

@bajtos bajtos added the Docs label Jun 21, 2018
@bajtos bajtos added this to the June Milestone milestone Jun 21, 2018
@bajtos bajtos self-assigned this Jun 21, 2018
@bajtos bajtos requested review from a team and raymondfeng June 21, 2018 10:27
@bajtos bajtos mentioned this pull request Jun 21, 2018
6 tasks
#### Obtain a Service Proxy instance

In
[./Calling-other-APIs-and-Web-Services.md#make-service-proxies-easier-to-test],
Copy link
Contributor

Choose a reason for hiding this comment

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

Broken link here

Copy link
Member Author

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

Copy link
Contributor

@jannyHou jannyHou left a 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 {
Copy link
Contributor

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?

Copy link
Member Author

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.

@bajtos bajtos force-pushed the docs/testing-services branch from 786ae96 to c33b8df Compare June 22, 2018 11:17
@bajtos bajtos merged commit 36bbc60 into master Jun 22, 2018
@bajtos bajtos deleted the docs/testing-services branch June 22, 2018 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants