UNPKG

@nielse63/generate-tests

Version:

Automatically generate jest specs for uncovered source files

31 lines (30 loc) 802 B
import { Ignore } from 'ignore'; export interface FileObject { file: string; abspath: string; testpath: string; basename: string; classname: string; } export interface Options { cwd?: string; glob?: string; } export declare const defaults: { glob: string; }; export declare class GenerateTests { cwd: string; glob: string; fileobjects: FileObject[]; ignoredPatterns: string[]; ignore: Ignore; constructor(options: Options | string); run(): Promise<FileObject[]>; findGitignoreFiles(filepath?: string): Promise<string[]>; findFiles(): Promise<string[]>; createFileObjects(files: string[]): FileObject[]; ensureFiles(): Promise<void>; writeFiles(): Promise<void>; static createTestTemplate(classname: string): string; }