@servant/servant-jasmine-node
Version:
Servant testing module for jasmine tests running in node.
67 lines (66 loc) • 1.77 kB
TypeScript
export interface TestsResults {
summary: {
time: [number, number];
testsCount: number;
completedCount: number;
failedCount: number;
excludedCount: number;
pendingCount: number;
passed: boolean;
excluded: boolean;
pending: boolean;
done: boolean;
random: {
state: boolean;
seed: number | string;
};
};
error: string | null;
results: {
[key: string]: TestsSuit | TestsSpec;
};
failed: Array<TestsSpec | TestsSuit>;
excluded: Array<TestsSpec | TestsSuit>;
pending: Array<TestsSpec | TestsSuit>;
}
export declare enum TestsItemType {
Suit = 0,
Spec = 1
}
export declare enum TestsSpecStatus {
Failed = "failed",
Passed = "passed",
Excluded = "excluded",
Pending = "pending"
}
export interface TestsSuit {
name: string;
fullName: string;
type: TestsItemType;
suits: {
[key: string]: TestsSuit | TestsSpec;
};
failed: Array<SpecExpectation>;
duration: null | number;
done: boolean;
status: TestsSpecStatus;
}
export interface TestsSpec {
name: string;
fullName: string;
type: TestsItemType;
status: TestsSpecStatus;
pending: string | null;
passed: Array<SpecExpectation>;
failed: Array<SpecExpectation>;
done: boolean;
}
export interface SpecExpectation {
actual?: unknown;
expected?: unknown;
matcherName: string;
message: string;
passed: boolean;
stack: string;
}
export declare function testNode(cwd: string | null, entry: string | null, tests: Array<string>, progress: (results: TestsResults) => void): Promise<TestsResults>;