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.
39 lines (38 loc) • 1.63 kB
TypeScript
import { MatcherChainFinisher, MatcherChainWithFinisher } from "../types";
import { Matcher, MatcherState } from "./matcher";
import { ModifyWithMatcher } from "./modify-with.matcher";
import { ToCallWithMatcher } from "./to-call-with.matcher";
export interface InputMatcherState extends MatcherState {
inputSelector: string;
}
export declare class InputMatcher extends Matcher {
protected state: InputMatcherState;
constructor(state: InputMatcherState);
/**
* Expect the input of the selected element to equal the provided value.
*
* input="value"
*
* @param value - The value to compare with the input value of the selected element.
*/
toEqual(value: unknown): MatcherChainFinisher<this>;
/**
* Expect the input of the selected element to be bound to the provided property of the fixture's component.\
* NOTE: Does not work for getters.
*
* [input]="property"
*
* @param property - The property of the fixture's component that should be bounded to the input of the selected element.
*/
toBeBoundTo(property: string): MatcherChainWithFinisher<ModifyWithMatcher>;
/**
* Expect the input of the selected element to call the provided function of the fixture's component.
* Also checks if the return value of the function is assigned to the input.
*
* [input]="func()"
*
* @param func - The function of the fixture's component that should be called by the input of the selected element.
*/
toCall(func: string): MatcherChainWithFinisher<ToCallWithMatcher>;
private getDescriptionModifier;
}