1
1
mirror of https://github.com/theoludwig/html-w3c-validator.git synced 2025-05-21 23:21:29 +02:00

chore: initial commit

This commit is contained in:
Divlo
2022-01-06 19:52:25 +01:00
commit dc971f54ea
42 changed files with 23536 additions and 0 deletions

View File

@ -0,0 +1,22 @@
import { cli } from '../cli.js'
import { HTMLValidatorCommand } from '../HTMLValidatorCommand.js'
describe('html-w3c-validator', () => {
afterEach(() => {
jest.clearAllMocks()
})
it('should be instance of the command', async () => {
const command = cli.process([])
expect(command).toBeInstanceOf(HTMLValidatorCommand)
})
it('succeeds and validate the html correctly', async () => {
console.log = jest.fn()
const exitCode = await cli.run([], {
stdin: process.stdin
})
expect(console.log).toHaveBeenCalledWith('html-w3c-validator')
expect(exitCode).toEqual(0)
})
})