Conversation
|
@mayakoneval: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
| * | ||
| * Call `uncaptureApplicationOutput` to reverse the effects of this function. | ||
| */ | ||
| function captureApplicationOutput() { |
There was a problem hiding this comment.
this and the following function are copied from check.test.ts I am not sure how to share them with a shared console.log. They currently mock the console log output, save it and check it against the snapshot. I think these functions should be shared helper methods between all CLI tests, however when sharing them, since jest runs the tests in parallel (between files), the mocking gets overwritten. Would appreciate ideas!
There was a problem hiding this comment.
hmmm... I think this would actually hugely benefit from passing in a custom logger to the entirety of the apollo CLI. Probably a feature we should log somewhere, if it's not already. That way you can just instantiate the tests with a writeToMap logger that stores the log output in an array under the test name or something.
There was a problem hiding this comment.
@zionts, agree on both fronts - definitely a feature we should consider adding. In the meantime, @mayakoneval can you add comments in both places that this code is duplicated by necessity? Enough to provide some context for future implementors, as they may have to do the same thing.
zionts
left a comment
There was a problem hiding this comment.
Generally looks good! Liking the added tests and the format of the output feels like just the right amount of detail to me. This is just a fly-by review since you said you were blocked. Please ping me if you want me to take another look :)
| config | ||
| }; | ||
|
|
||
| Object.assign(ctx, newContext); |
There was a problem hiding this comment.
I thought people preferred the spread operator thing now, but idk things
3aa3ce6 to
451e931
Compare
| * | ||
| * Call `uncaptureApplicationOutput` to reverse the effects of this function. | ||
| */ | ||
| function captureApplicationOutput() { |
There was a problem hiding this comment.
@zionts, agree on both fronts - definitely a feature we should consider adding. In the meantime, @mayakoneval can you add comments in both places that this code is duplicated by necessity? Enough to provide some context for future implementors, as they may have to do the same thing.
aa5ba99 to
eaad228
Compare
This PR adds

service:listto the Apollo CLI tool, printing out the lists in a federated services like so:Open questions:
is copy / pasting the functions(resolved - see comment below)uncaptureApplicationOutputandcaptureApplicationOutputnecessary / how do you share those testing helpers with the shared console log?TODO:
*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.