@serenity-js/assertions
Version:
Serenity/JS universal assertion library supporting all types of functional tests, including both web and REST API scenarios
28 lines • 960 B
TypeScript
import { Expectation } from '@serenity-js/core';
/**
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value
* is equal to the resolved value of `expectedValue`.
*
* Note that the equality check performs comparison **by value**
* using [TinyTypes `equal`](https://github.com/jan-molak/tiny-types/blob/master/src/objects/equal.ts).
*
* ## Ensuring that the actual value equals expected value
*
* ```ts
* import { actorCalled } from '@serenity-js/core'
* import { Ensure, equals } from '@serenity-js/assertions'
*
* const actual = { name: 'apples' }
* const expected = { name: 'apples' }
*
* await actorCalled('Ester').attemptsTo(
* Ensure.that(actual, equals(expected)),
* )
* ```
*
* @param expectedValue
*
* @group Expectations
*/
export declare const equals: <T>(expected: import("@serenity-js/core").Answerable<T>) => Expectation<T>;
//# sourceMappingURL=equals.d.ts.map