runInvokePublish = async (pkgNames, opts = {}, caps = {}) => {
    opts = { ...BASE_OPTS, ...opts }
    t.true(opts.dryRun, 'dryRun must be true for tests')
    const laverna = new Laverna(opts, {
      ...BASE_CAPS,
      console: console,
      spawn: spawn,
      ...caps,
    })
    await laverna.invokePublish(pkgNames)
  }
Helps run {@link Laverna.invokePublish} with a custom set of options and
caps.

Provides the default {@link ConsoleSpy} and {@link SpawnSpy} implementations
if not overridden by the test.

Does not create a child process

@param {string[]} pkgNames
@param {import('../src/types').LavernaOptions} opts
@param {import('../src/types').LavernaCapabilities} caps
@returns {Promise<void>}