How to use the listr.mock function in listr

To help you get started, we’ve selected a few listr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okonet / lint-staged / test / index2.spec.js View on Github external
it('should pass debug flag to Listr', async () => {
    expect.assertions(1)
    await lintStaged(
      {
        configPath: path.join(__dirname, '__mocks__', 'my-config.json'),
        debug: true
      },
      console
    )
    expect(Listr.mock.calls[0][1]).toEqual({ dateFormat: false, renderer: 'verbose' })
  })
})
github okonet / lint-staged / test / index2.spec.js View on Github external
it('should pass quiet flag to Listr', async () => {
    expect.assertions(1)
    await lintStaged(
      { configPath: path.join(__dirname, '__mocks__', 'my-config.json'), quiet: true },
      console
    )
    expect(Listr.mock.calls[0][1]).toEqual({ dateFormat: false, renderer: 'silent' })
  })

listr

Terminal task list

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis

Popular listr functions