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.
32 lines (31 loc) • 1.35 kB
TypeScript
import { MatcherChainWithFinisher } from "../types";
import { Matcher, MatcherState } from "./matcher";
import { ModifyWithMatcher } from "./modify-with.matcher";
import { ToCallWithMatcher } from "./to-call-with.matcher";
export interface OutputMatcherState extends MatcherState {
outputSelector: string;
}
export declare class OutputMatcher extends Matcher {
protected state: OutputMatcherState;
constructor(state: OutputMatcherState);
/**
* Expect the output of the selected element to be bound to the provided property of the fixture's component.\
* NOTE: Does not work for setters if there is no getter.
*
* (output)="property = $event"
*
* @param property - The property of the fixture's component that should be bounded to the output of the selected element.
*/
toBeBoundTo(property: string): MatcherChainWithFinisher<ModifyWithMatcher>;
/**
* Expect the output of the selected element to call the provided function of the fixture's component.
*
* (output)="func()"
*
* @param func - The function of the fixture's component that should be called by the output of the selected element.
*/
toCall(func: string): MatcherChainWithFinisher<ToCallWithMatcher>;
private getDescriptionModifier;
private dispatchEvent;
private dispatchNativeEvent;
}