Skip to content

Get Result from CommandTestFactory.run #725

Answered by jmcdo29
ColiZei asked this question in Q&A
Discussion options

You must be logged in to vote

Currently, there isn't a way to return the result of the command, mainly due to the fact that when running the command there's no return to anything, usually only outcomes like writing a log to the terminal, making changes to a database, or calling an API.

I could probably write up a way to get the CommandTestFactory.run() to return whatever the result of whatever command ran, to help with testing, but you'd almost be better off spying on the command and its run method and asserting what the spy responds with.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ColiZei
Comment options

@ColiZei
Comment options

@jharrisonio
Comment options

@TomOthentic
Comment options

@ColiZei
Comment options

Answer selected by ColiZei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants