Conversation
f21ec34 to
a697d00
Compare
c69ed7d to
86e416b
Compare
packages/booter-lb3app/src/__tests__/acceptance/booter-lb3app.acceptance.ts
Show resolved
Hide resolved
8951de5 to
4d2dd1e
Compare
bajtos
left a comment
There was a problem hiding this comment.
The implementations looks pretty good. I see that you have followed the checklist for adding new packages, kudos for that 👏
Let's improve the test suite now. I find the current test suite as too difficult to reason about. There are many fixture files adding lot of functionality on top of default LB3 & LB4 applications, it's not clear what is relevant for the LB3 booter and what's just "random stuff copied from elsewhere".
Ideally, I'd like the test suite to be more focused. Start with a minimal LB3 application with a single model, place this e.g. to /fixtures/minimal-app. In your test code, create a minimal LB4 application. I think you don't even need to create any new class, just call new RestApplication. Configure this LB4 app with the new booter and start it. Then verify that the endpoints from LB3 were exposed as expected. I think that's good enough for the first version of this feature. We can add more tests later to verify more complex configuration, if we ever discover any problems there.
packages/booter-lb3app/src/__tests__/acceptance/booter-lb3app.acceptance.ts
Outdated
Show resolved
Hide resolved
packages/booter-lb3app/src/__tests__/fixtures/legacy/common/models/coffee-shop.js
Outdated
Show resolved
Hide resolved
packages/booter-lb3app/src/__tests__/fixtures/src/application.ts
Outdated
Show resolved
Hide resolved
packages/booter-lb3app/src/__tests__/fixtures/src/coffee.controller.ts
Outdated
Show resolved
Hide resolved
packages/booter-lb3app/src/__tests__/fixtures/src/datasources/ds.datasource.json
Outdated
Show resolved
Hide resolved
a28a88f to
465743e
Compare
b-admike
left a comment
There was a problem hiding this comment.
I've went through most of the commit (minus some updating deps), and overall the patch looks great 👍.
packages/booter-lb3app/src/__tests__/acceptance/booter-lb3app.acceptance.ts
Outdated
Show resolved
Hide resolved
| }); | ||
| }); | ||
|
|
||
| context('open API spec endpoints', () => { |
| ]); | ||
| }); | ||
|
|
||
| context('LoopBack 3 authentication', () => { |
444b49a to
70de24c
Compare
c122fd5 to
694daf8
Compare
Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Closes #2391.
This PR adds the
booter-lb3apppackage that assists in booting and mounting a LoopBack 3 application and exposing its REST API through LoopBack 4.Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated