MCPcopy
hub / github.com/angular/components / addOption

Method addOption

src/cdk/testing/component-harness.ts:666–671  ·  view source on GitHub ↗

* Adds a predicate function that depends on an option value to be run against candidate * harnesses. If the option value is undefined, the predicate will be ignored. * @param name The name of the option (may be used in error messages). * @param option The option value. * @param predicate

(name: string, option: O | undefined, predicate: AsyncOptionPredicate<T, O>)

Source from the content-addressed store, hash-verified

664 * @return this (for method chaining).
665 */
666 addOption<O>(name: string, option: O | undefined, predicate: AsyncOptionPredicate<T, O>) {
667 if (option !== undefined) {
668 this.add(`${name} = ${_valueAsString(option)}`, item => predicate(item, option));
669 }
670 return this;
671 }
672
673 /**
674 * Filters a list of harnesses on this predicate.

Callers 15

withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80
withMethod · 0.80

Calls 2

addMethod · 0.95
_valueAsStringFunction · 0.85

Tested by

no test coverage detected