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