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({ OPENAI_TOKEN: await testQenv.getEnvVarOnDemand('OPENAI_TOKEN'), }); expect(aidocs).toBeInstanceOf(tsdocs.AiDoc); }); tap.test('should start AIdocs', async () => { await aidocs.start(); }); tap.skip.test('should start AIdocs', async () => { await aidocs.buildReadme('./'); }); tap.skip.test('should start AIdocs', async () => { await aidocs.buildDescription('./'); }); 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'); expect(commitObject).toHaveProperty('recommendedNextVersionScope'); expect(commitObject).toHaveProperty('recommendedNextVersionMessage'); }) tap.start();