assert-testing
Version:
When it comes to testing, I am a simple man. I just need a function that throws an error when "false" is inputted. Maybe some message and a compliment when the code found no errors. Welcome to my testing package.
43 lines (42 loc) • 1.1 kB
TypeScript
/**
* Class for simple testing
* @example testing.Assert(1 + 2 === 4) -> this will write an error into the console
*/
export declare class Testing {
private testName;
private assertCount;
private errorCount;
/**
* Create new test
* @param testName Test name (optional)
*/
constructor(testName?: string);
/**
* Set the testing name
* @param testName Name of the test
*/
SetTestName(testName: string): void;
/**
* Returns current test name
* @returns Current test name
*/
GetTestName(): string;
/**
* Testing method. If input is false, error is called.
* @param input Testing sample (boolean)
*/
Assert(input: boolean): void;
/**
* Testing method. If input is false, error is called.
* @param input Testing sample (boolean)
*/
static Assert(input: boolean): void;
/**
* Prints "start statement"
*/
StartTestingLog(): void;
/**
* Prints "end statement" with error count
*/
EndTestingLog(): void;
}