fix(core): update

This commit is contained in:
2023-10-12 01:21:12 +02:00
parent 2c4db09ac1
commit c5eb97efff
18 changed files with 4227 additions and 14208 deletions

View File

@@ -1,23 +1,17 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as legal from '../ts/index';
tap.test('should create instance of licenseChecker', async () => {
const licenseChecker = await legal.createLicenseChecker();
const plainResultArray = await licenseChecker.createPlainResultArray(process.cwd());
expect(plainResultArray).to.be.instanceof(Array);
expect(plainResultArray[0]).to.have.property('license');
});
import { tap, expect } from '@push.rocks/tapbundle';
import * as legal from '../ts/index.js';
tap.test('should exclude certain licenses', async () => {
const licenseChecker = await legal.createLicenseChecker();
const checkResult = await licenseChecker.excludeLicenseWithinPath(process.cwd(), ['MIT']);
expect(checkResult.failingModules.length).to.be.greaterThan(10);
expect(checkResult.failingModules.length).toBeGreaterThan(10);
console.log(checkResult);
});
tap.test('should include certain licenses', async () => {
const licenseChecker = await legal.createLicenseChecker();
const checkResult = await licenseChecker.includeLicencesWithinPath(process.cwd(), ['MIT']);
expect(checkResult.failingModules.length).to.be.greaterThan(10);
expect(checkResult.failingModules.length).toBeGreaterThan(10);
});
tap.start();