checki
Version:
Checki is an AI-driven CLI tool that generates Jest unit tests for React components, improving testing efficiency.
33 lines (27 loc) • 982 B
text/typescript
/**
* Checki CLI: Utility to generate react unit tests with the help of AI
* @name checki
* @module checki
**/
import { cli, command } from './common/decorators'
import cmds from './cmds'
require('dotenv').config()
//
export default class checki {
constructor(arg: { silent?: boolean } = { silent: true }) {}
('Initializes a react project with checki scripts', [
[ '-o', '--openai', 'OpenAI apikey.'],
[ '-p', '--path', `Path of react project. Defaults to current path`],
],'[options]')
async init(arg: any) {
await (new cmds.Init(arg)).run();
}
('Generates jsdoc test stories for each component within project', [
[ '-o', '--openai', 'OpenAI apikey.'],
[ '-p', '--path', `Path of react project. Defaults to current path`],
],'[options]')
async jsdoc(arg: any) {
await (new cmds.JsDoc(arg)).run();
}
}