Skip to content

Draft: add tests to verify the behavior of the function exported by the CLI package

Dan Allen requested to merge opendevise/oss/antora:test-cli-function into main

This MR is more of a conversation starter. In Antora 3, we changed the CLI to not call process.exit(). That meant that the function exported by the CLI package could be called by another program. However, in writing these tests, we discovered that the behavior of this function when used in that context is a bit odd and inconsistent. I think we may want to step back and think about what this function should be doing. Specifically, what should it return, should it ensure that process.exit is never called (even by commander), and how should it handle a logger which has already been configured?

For now, this function should not be considered part of Antora's public API.

Edited by Dan Allen

Merge request reports