hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
31 lines (25 loc) • 697 B
text/typescript
import type { SolidityTestResult, SuiteResult } from "@nomicfoundation/edr";
import type { Readable } from "node:stream";
export type TestStatus = "Success" | "Failure" | "Skipped";
export type TestsStream = Readable;
export type TestEvent =
| {
type: "suite:done";
data: SuiteResult;
}
| {
type: "run:done";
data: SolidityTestResult;
};
export type TestEventSource = AsyncGenerator<TestEvent, void>;
export type TestReporterResult = AsyncGenerator<
| string
| {
failed: number;
passed: number;
skipped: number;
failureOutput: string;
},
void
>;
export type TestReporter = (source: TestEventSource) => TestReporterResult;