UNPKG

634 BJavaScriptView Raw
1import {assert} from 'chai';
2import {htmlhint} from './../bin/code-assess';
3
4describe('HtmlHint tests', () => {
5
6 it('should run htmlhint with a local rc file.', async () => {
7 const err = await htmlhint('test/testFiles/success');
8 assert.isNull(err);
9 }).timeout(5000);
10
11 it('should run htmllint with default rc file.', async () => {
12 const err = await htmlhint('test/testFiles/success', '.htmlhintrc');
13 assert.isNull(err);
14 }).timeout(5000);
15
16 it('should run eslint and throw an error.', async () => {
17 const err = await htmlhint('test/testFiles/fail');
18 assert.isNotNull(err.Error);
19 }).timeout(5000);
20});