Mock-ing Commander for Unit Testing

I am trying to determine the best way to unit test the main entry point into a CLI that I’ve built. The file that I’d like to Mock is here: https://github.com/mike-weiner/wlbot/blob/main/index.js

The first problem I’ve encountered is trying to determine if this file should even be unit tested. I’ve written unit tests for the underlying functions that Commander calls, so I’m wondering if there’s no real added benefit to testing this file.

The second problem I’m encountering is how to use jest.unstable_mockModule to mock Commander. I’ve read through the docs, but that was not all that helpful.

I have written quite a few tests using jest.unstable_mockModule for other parts of this CLI. As an example: https://github.com/mike-weiner/wlbot/blob/main/commands/weather/__tests__/current.test.js#L3-L26