You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
476 B

const assert = require('assert');
const { check } = require('../src/checker.js');
async function test() {
const error = await check().catch((error) => error);
assert(/No configuration provided/.test(error.message));
const fail = await check('./test/fail');
assert(fail.length > 0);
assert(fail.includes('indentation'));
const pass = await check('./test/pass');
assert(pass === null);
}
test().catch((error) => {
console.error(error);
process.exitCode = 1;
});