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 throw error for failed linters', async () => {
expect.assertions(1)
pMap.mockResolvedValueOnce([
{
stdout: 'Mock error',
stderr: '',
code: 0,
failed: true,
cmd: 'mock cmd'
}
])
const taskFn = resolveTaskFn({
...defaultOpts,
linter: 'mock-fail-linter'
})
try {
await taskFn()
} catch (err) {