UNPKG

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.

23 lines (22 loc) 751 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ModifyWithMatcher = void 0; const matcher_1 = require("./matcher"); class ModifyWithMatcher extends matcher_1.Matcher { /** * Expect the bounded property to be modified with the provided value. * * [input]="property"\ * (output)="property = $event"\ * (output)="property = value" * * @param value - The value to modify the bounded property with. */ modifyWith(value) { const toBeBoundToMatcher = this.state.matcher; this.appendDescription(`modified with '${value}'`); this.setMatcher(() => toBeBoundToMatcher(value)); return this; } } exports.ModifyWithMatcher = ModifyWithMatcher;