mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-19 16:32:58 +00:00
25 lines
510 B
JavaScript
25 lines
510 B
JavaScript
'use strict';
|
|
|
|
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('scss/operator-no-newline-after'));
|
|
|
|
const pass = await check('./test/pass');
|
|
|
|
assert(pass === null);
|
|
}
|
|
|
|
test().catch((error) => {
|
|
console.error(error);
|
|
process.exitCode = 1;
|
|
});
|