method
test.Matchers.toSatisfy
predicate: (value: T) => boolean
): void;
Asserts that a value satisfies a custom condition.
@param predicate
a function that receives the value passed to expect and returns a boolean
expect(1).toSatisfy((val) => val > 0);
expect("foo").toSatisfy((val) => val === "foo");
expect("bar").not.toSatisfy((val) => val === "bun");