Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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' })
})
})
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' })
})