piumino
Version:
Piumino, meaning duvet in Italian, is like a duvet over the bed called Angular TestBed. It provides test helpers to test trivial things like inputs and outputs with a single line.
29 lines (28 loc) • 1.18 kB
TypeScript
import { DebugElement } from "@angular/core";
import { ComponentFixtureLike, MatcherChain, MatcherFunction, Selector, TestDefinition } from "../types";
export interface MatcherState {
selector: Selector;
negate?: boolean;
description?: string;
errorDescription?: string;
errorStack?: string;
getFixture: () => ComponentFixtureLike | null;
matcher?: MatcherFunction;
}
export declare abstract class Matcher {
protected state: MatcherState;
get not(): MatcherChain<this>;
constructor(state: MatcherState);
build(): TestDefinition;
execute(): void;
protected setDescription(description: string, modifier?: string): void;
protected appendDescription(description: string): void;
protected setMatcher(matcher: MatcherFunction): void;
protected getFixture(): ComponentFixtureLike;
protected getComponent(): any;
protected checkComponentHasProperty(property: string): void;
protected getElement(throwError?: boolean): DebugElement;
protected checkElementHasProperty(property: string): void;
protected throwError(message: string, received?: unknown, expected?: unknown): never;
private stringifyValue;
}