mirror of
https://github.com/hanzoai/lint-staged.git
synced 2026-10-30 19:37:36 +00:00
18 lines
456 B
JavaScript
18 lines
456 B
JavaScript
import { describe, it, vi } from 'vitest'
|
|
|
|
import { printTaskOutput } from '../../lib/printTaskOutput.js'
|
|
|
|
const logger = {
|
|
error: vi.fn(() => {}),
|
|
log: vi.fn(() => {}),
|
|
}
|
|
|
|
describe('printTaskOutput', () => {
|
|
it('should no-op when context is incomplete', ({ expect }) => {
|
|
printTaskOutput(undefined, logger)
|
|
printTaskOutput({}, logger)
|
|
expect(logger.error).toHaveBeenCalledTimes(0)
|
|
expect(logger.log).toHaveBeenCalledTimes(0)
|
|
})
|
|
})
|