Conversation
| expect(txHash).toBeTruthy(); | ||
|
|
||
| const r = (await runCommand(["receipt", txHash])).result as ProcessedReceipt; | ||
| expect(r.success).toBeTruthy(); |
There was a problem hiding this comment.
Let's also check that output contains the string Receipt data:.
By the way, I guess in the case of --quiet we only need to print the json itself.
There was a problem hiding this comment.
fixed. also fixed for the block command
regarding output: I haven't found an easy way to get it. inb4: r.stdout / r.stderr is empty
There was a problem hiding this comment.
I did some research, and found out that without disableConsoleIntercept in vitest, intercepting the output in runCommand doesn't work. They are in conflict. We need to figure out how to make them work together correctly.
There was a problem hiding this comment.
Hmm. The documentation for oclif/test explicitly says to use disableConsoleIntercept for vitest.
add receipt command to clijs. also during this I noticed that the CLI hangs for ~5-10 seconds after finishing the command logic
main reason seems to be in many promises hanging inside the node event loop. those are created during package imports or some open-rpc connections and closed only by timeout. so this PR also adds logic to exit from the process on success