Skip to main content

BettererTestFunction

API > @betterer/betterer > BettererTestFunction

A function that runs the actual test.

Signature

export declare type BettererTestFunction<DeserialisedType> = (run: BettererRun) => MaybeAsync<DeserialisedType>;

References

BettererRun

Example

import { BettererRun } from '@betterer/betterer';

export function test (run: BettererRun): number {
const numberOfJavaScriptFiles = countJavaScriptFiles(run.filePaths);
return numberOfJavaScriptFiles;
}