smartpnpm/test/test.ts
2023-10-11 18:12:09 +02:00

27 lines
714 B
TypeScript

import { expect, expectAsync, tap } from '@push.rocks/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 = testSmartpnpm.getDependencyLicenseJson();
});
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);
});
tap.start()