bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
79 lines (78 loc) • 1.94 kB
TypeScript
import { PathLinux, PathOsBased } from '../../utils/path';
import { BitId } from '../../bit-id';
declare type ErrorObj = {
message: string;
stack: string;
};
declare type Test = {
title: string;
pass: boolean;
err: ErrorObj | null | undefined;
duration: number;
};
declare type Failure = {
title: string;
err: ErrorObj | null | undefined;
duration: number;
};
declare type Stats = {
start: string;
end: string;
duration: number;
};
export declare type Results = {
tests: Test[];
stats: Stats;
pass: boolean;
failures: Failure[];
specFile: PathLinux;
};
declare type TestProps = {
title: string;
pass: boolean;
err: ErrorObj | null | undefined;
duration: number | string;
};
declare type StatsProps = {
start: string;
end: string;
duration: number | null | undefined | string;
};
export declare type RawTestsResults = {
tests: TestProps[];
stats: StatsProps;
pass: boolean | null | undefined;
failures: Failure[] | null | undefined;
specPath: PathOsBased;
};
export declare type SpecsResultsWithComponentId = Array<{
componentId: BitId;
specs: SpecsResults;
missingTester?: boolean;
missingDistSpecs?: boolean;
pass: boolean;
}>;
export declare type SpecsResultsWithMetaData = {
type: 'results' | 'error';
childOutput?: string;
error?: Error;
results?: SpecsResultsWithComponentId;
};
export default class SpecsResults {
tests: Test[];
stats: Stats;
pass: boolean;
failures: Failure[];
specFile: PathLinux;
constructor({ tests, stats, pass, failures, specFile }: Results);
serialize(): {
tests: Test[];
stats: Stats;
pass: boolean;
failures: Failure[];
specFile: string;
};
static deserialize(plainObject: Results): SpecsResults;
static createFromRaw(rawResults: RawTestsResults): SpecsResults;
}
export {};