tsdoc/test/test.aidoc.nonci.ts

40 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-04-03 11:34:26 +00:00
import { tap, expect } from '@push.rocks/tapbundle';
import * as qenv from '@push.rocks/qenv';
let testQenv = new qenv.Qenv('./', '.nogit/');
import * as tsdocs from '../ts/index.js';
let aidocs: tsdocs.AiDoc;
tap.test('should create an AIdocs class', async () => {
aidocs = new tsdocs.AiDoc({
2024-06-22 11:20:55 +00:00
OPENAI_TOKEN: await testQenv.getEnvVarOnDemand('OPENAI_TOKEN'),
2024-04-03 11:34:26 +00:00
});
expect(aidocs).toBeInstanceOf(tsdocs.AiDoc);
});
tap.test('should start AIdocs', async () => {
await aidocs.start();
2024-06-22 19:21:52 +00:00
});
tap.skip.test('should start AIdocs', async () => {
2024-04-03 11:34:26 +00:00
await aidocs.buildReadme('./');
2024-06-22 11:20:55 +00:00
});
2024-04-03 11:34:26 +00:00
2024-06-22 19:21:52 +00:00
tap.skip.test('should start AIdocs', async () => {
2024-04-03 11:34:26 +00:00
await aidocs.buildDescription('./');
2024-06-22 11:20:55 +00:00
});
2024-04-03 11:34:26 +00:00
2024-06-22 19:21:52 +00:00
tap.test('should build commit object', async () => {
const commitObject = await aidocs.buildNextCommitObject('./');
console.log(commitObject);
expect(commitObject).not.toBeUndefined();
expect(commitObject).toHaveProperty('recommendedNextVersion');
expect(commitObject).toHaveProperty('recommendedNextVersionLevel');
2024-06-23 10:27:26 +00:00
expect(commitObject).toHaveProperty('recommendedNextVersionScope');
expect(commitObject).toHaveProperty('recommendedNextVersionMessage');
2024-06-22 19:21:52 +00:00
})
2024-06-22 11:20:55 +00:00
tap.start();