28 lines
772 B
TypeScript
28 lines
772 B
TypeScript
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
|
import * as smartpnpm from '../ts/index.js';
|
|
|
|
let testSmartpnpm: smartpnpm.SmartPnpm;
|
|
|
|
tap.test('first test', async () => {
|
|
testSmartpnpm = new smartpnpm.SmartPnpm(process.cwd());
|
|
expect(testSmartpnpm).toBeInstanceOf(smartpnpm.SmartPnpm);
|
|
});
|
|
|
|
tap.test('should list depdendencies', async () => {
|
|
const result = await testSmartpnpm.getDependencyLicenseJson();
|
|
expect(result).toBeInstanceOf(Object);
|
|
});
|
|
|
|
tap.test('should print license summary', async () => {
|
|
await testSmartpnpm.printDependencyLicenseSummary();
|
|
});
|
|
|
|
tap.test('should get a simple array of licenses', async () => {
|
|
const result = await testSmartpnpm.getDependencyLicenseArray();
|
|
console.log(result);
|
|
});
|
|
|
|
|
|
|
|
export default tap.start();
|