@serenity-js/assertions 3.25.0 → 3.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/lib/Ensure.d.ts +18 -20
- package/lib/Ensure.d.ts.map +1 -1
- package/lib/Ensure.js +18 -20
- package/lib/Ensure.js.map +1 -1
- package/lib/EnsureEventually.d.ts +9 -9
- package/lib/EnsureEventually.js +9 -9
- package/lib/expectations/and.d.ts +1 -1
- package/lib/expectations/and.js +1 -1
- package/lib/expectations/contain.d.ts +1 -1
- package/lib/expectations/contain.js +1 -1
- package/lib/expectations/containAtLeastOneItemThat.d.ts +1 -1
- package/lib/expectations/containAtLeastOneItemThat.js +1 -1
- package/lib/expectations/containItemsWhereEachItem.d.ts +1 -1
- package/lib/expectations/containItemsWhereEachItem.js +1 -1
- package/lib/expectations/endsWith.d.ts +1 -1
- package/lib/expectations/endsWith.js +1 -1
- package/lib/expectations/equals.d.ts +1 -1
- package/lib/expectations/equals.js +1 -1
- package/lib/expectations/includes.d.ts +2 -2
- package/lib/expectations/includes.js +2 -2
- package/lib/expectations/isAfter.d.ts +1 -1
- package/lib/expectations/isAfter.js +1 -1
- package/lib/expectations/isBefore.d.ts +1 -1
- package/lib/expectations/isBefore.js +1 -1
- package/lib/expectations/isCloseTo.d.ts +1 -1
- package/lib/expectations/isCloseTo.js +1 -1
- package/lib/expectations/isFalse.d.ts +1 -1
- package/lib/expectations/isFalse.js +1 -1
- package/lib/expectations/isGreaterThan.d.ts +1 -1
- package/lib/expectations/isGreaterThan.js +1 -1
- package/lib/expectations/isLessThan.d.ts +1 -1
- package/lib/expectations/isLessThan.js +1 -1
- package/lib/expectations/isPresent.d.ts +4 -3
- package/lib/expectations/isPresent.d.ts.map +1 -1
- package/lib/expectations/isPresent.js +4 -3
- package/lib/expectations/isPresent.js.map +1 -1
- package/lib/expectations/isTrue.d.ts +1 -1
- package/lib/expectations/isTrue.js +1 -1
- package/lib/expectations/matches.d.ts +1 -1
- package/lib/expectations/matches.js +1 -1
- package/lib/expectations/not.d.ts +1 -1
- package/lib/expectations/not.js +1 -1
- package/lib/expectations/or.d.ts +1 -1
- package/lib/expectations/or.js +1 -1
- package/lib/expectations/property.d.ts +1 -1
- package/lib/expectations/property.js +1 -1
- package/lib/expectations/startsWith.d.ts +1 -1
- package/lib/expectations/startsWith.js +1 -1
- package/package.json +4 -4
- package/src/Ensure.ts +18 -20
- package/src/EnsureEventually.ts +9 -9
- package/src/expectations/and.ts +1 -1
- package/src/expectations/contain.ts +1 -1
- package/src/expectations/containAtLeastOneItemThat.ts +1 -1
- package/src/expectations/containItemsWhereEachItem.ts +1 -1
- package/src/expectations/endsWith.ts +1 -1
- package/src/expectations/equals.ts +1 -1
- package/src/expectations/includes.ts +2 -2
- package/src/expectations/isAfter.ts +1 -1
- package/src/expectations/isBefore.ts +1 -1
- package/src/expectations/isCloseTo.ts +1 -1
- package/src/expectations/isFalse.ts +1 -1
- package/src/expectations/isGreaterThan.ts +1 -1
- package/src/expectations/isLessThan.ts +1 -1
- package/src/expectations/isPresent.ts +4 -3
- package/src/expectations/isTrue.ts +1 -1
- package/src/expectations/matches.ts +1 -1
- package/src/expectations/not.ts +1 -1
- package/src/expectations/or.ts +1 -1
- package/src/expectations/property.ts +1 -1
- package/src/expectations/startsWith.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.25.2](https://github.com/serenity-js/serenity-js/compare/v3.25.1...v3.25.2) (2024-07-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/assertions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.25.1](https://github.com/serenity-js/serenity-js/compare/v3.25.0...v3.25.1) (2024-07-10)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **core:** all the API docs now link to the online Serenity/JS API documentation ([f8f451d](https://github.com/serenity-js/serenity-js/commit/f8f451dffdb4caaa2e31a860f59d59470f4856ad))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.25.0](https://github.com/serenity-js/serenity-js/compare/v3.24.1...v3.25.0) (2024-07-03)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @serenity-js/assertions
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ of complex software systems faster, more collaborative and easier to scale.
|
|
|
17
17
|
👋 Join the Serenity/JS Community!
|
|
18
18
|
- Meet other Serenity/JS developers and maintainers on the [Serenity/JS Community chat channel](https://matrix.to/#/#serenity-js:gitter.im),
|
|
19
19
|
- Find answers to your Serenity/JS questions on the [Serenity/JS Forum](https://github.com/orgs/serenity-js/discussions/categories/how-do-i),
|
|
20
|
-
- Learn how to [contribute to Serenity/JS](https://serenity-js.org/contributing),
|
|
20
|
+
- Learn how to [contribute to Serenity/JS](https://serenity-js.org/community/contributing/),
|
|
21
21
|
- Support the project and gain access to [Serenity/JS Playbooks](https://github.com/serenity-js/playbooks) by becoming a [Serenity/JS GitHub Sponsor](https://github.com/sponsors/serenity-js)!
|
|
22
22
|
|
|
23
23
|
## Serenity/JS Assertions
|
package/lib/Ensure.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import type { Answerable, AnswersQuestions, CollectsArtifacts, Expectation, Runt
|
|
|
2
2
|
import { Interaction } from '@serenity-js/core';
|
|
3
3
|
import { EnsureEventually } from './EnsureEventually';
|
|
4
4
|
/**
|
|
5
|
-
* The
|
|
6
|
-
* verifies if the resolved value of the provided
|
|
7
|
-
* meets the specified
|
|
8
|
-
* If not, it throws an
|
|
5
|
+
* The [interaction](https://serenity-js.org/api/core/class/Interaction/) to `Ensure`
|
|
6
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
7
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/).
|
|
8
|
+
* If not, it throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
9
9
|
*
|
|
10
10
|
* Use `Ensure` to verify the state of the system under test.
|
|
11
11
|
*
|
|
@@ -52,34 +52,32 @@ export declare class Ensure<Actual> extends Interaction {
|
|
|
52
52
|
protected readonly actual: Answerable<Actual>;
|
|
53
53
|
protected readonly expectation: Expectation<Actual>;
|
|
54
54
|
/**
|
|
55
|
-
* Creates an
|
|
56
|
-
* verifies if the resolved value of the provided
|
|
57
|
-
* meets the specified
|
|
58
|
-
* If not, it immediately throws an
|
|
55
|
+
* Creates an [interaction](https://serenity-js.org/api/core/class/Interaction/) to `Ensure`, which
|
|
56
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
57
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/).
|
|
58
|
+
* If not, it immediately throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
59
59
|
*
|
|
60
60
|
* @param {Answerable<Actual_Type>} actual
|
|
61
|
-
* An
|
|
61
|
+
* An [`Answerable`](https://serenity-js.org/api/core/#Answerable) describing the actual state of the system.
|
|
62
62
|
*
|
|
63
63
|
* @param {Expectation<Actual_Type>} expectation
|
|
64
|
-
* An
|
|
64
|
+
* An [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) you expect the `actual` value to meet
|
|
65
65
|
*
|
|
66
66
|
* @returns {Ensure<Actual_Type>}
|
|
67
67
|
*/
|
|
68
68
|
static that<Actual_Type>(actual: Answerable<Actual_Type>, expectation: Expectation<Actual_Type>): Ensure<Actual_Type>;
|
|
69
69
|
/**
|
|
70
|
-
* Creates an
|
|
71
|
-
* verifies if the resolved value of the provided
|
|
72
|
-
* meets the specified
|
|
70
|
+
* Creates an [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`EnsureEventually`](https://serenity-js.org/api/assertions/class/EnsureEventually/),
|
|
71
|
+
* which verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
72
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) within the expected timeframe.
|
|
73
73
|
*
|
|
74
|
-
* If the expectation is not met by the time the timeout expires, the interaction throws an
|
|
75
|
-
* `EnsureEventually` ignores retries the evaluation if resolving the `actual` results in an {@apilink OptionalNotPresentError},
|
|
76
|
-
* but rethrows any other errors.
|
|
74
|
+
* If the expectation is not met by the time the timeout expires, the interaction throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
77
75
|
*
|
|
78
76
|
* @param {Answerable<Actual_Type>} actual
|
|
79
|
-
* An
|
|
77
|
+
* An [`Answerable`](https://serenity-js.org/api/core/#Answerable) describing the actual state of the system.
|
|
80
78
|
*
|
|
81
79
|
* @param {Expectation<Actual_Type>} expectation
|
|
82
|
-
* An
|
|
80
|
+
* An [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) you expect the `actual` value to meet
|
|
83
81
|
*
|
|
84
82
|
* @returns {Ensure<Actual_Type>}
|
|
85
83
|
*/
|
|
@@ -95,11 +93,11 @@ export declare class Ensure<Actual> extends Interaction {
|
|
|
95
93
|
*/
|
|
96
94
|
performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): Promise<void>;
|
|
97
95
|
/**
|
|
98
|
-
* Overrides the default
|
|
96
|
+
* Overrides the default [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/) thrown when
|
|
99
97
|
* the actual value does not meet the expectation.
|
|
100
98
|
*
|
|
101
99
|
* @param typeOfRuntimeError
|
|
102
|
-
* A constructor function producing a subtype of
|
|
100
|
+
* A constructor function producing a subtype of [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/) to throw, e.g. [`TestCompromisedError`](https://serenity-js.org/api/core/class/TestCompromisedError/)
|
|
103
101
|
*
|
|
104
102
|
* @param message
|
|
105
103
|
* The message explaining the failure
|
package/lib/Ensure.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ensure.d.ts","sourceRoot":"","sources":["../src/Ensure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAMH,WAAW,EAKd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,MAAM,CAAC,MAAM,CAAE,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"Ensure.d.ts","sourceRoot":"","sources":["../src/Ensure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAMH,WAAW,EAKd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,MAAM,CAAC,MAAM,CAAE,SAAQ,WAAW;IA6CvC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;IA5CvD;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC;IAIrH;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,gBAAgB,CAAC,WAAW,CAAC;IAIrI;;;;OAIG;IACH,OAAO;IAQP;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB3F;;;;;;;;;OASG;IACH,iBAAiB,CAAC,kBAAkB,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW;CAgB7H"}
|
package/lib/Ensure.js
CHANGED
|
@@ -4,10 +4,10 @@ exports.Ensure = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const EnsureEventually_1 = require("./EnsureEventually");
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
8
|
-
* verifies if the resolved value of the provided
|
|
9
|
-
* meets the specified
|
|
10
|
-
* If not, it throws an
|
|
7
|
+
* The [interaction](https://serenity-js.org/api/core/class/Interaction/) to `Ensure`
|
|
8
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
9
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/).
|
|
10
|
+
* If not, it throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
11
11
|
*
|
|
12
12
|
* Use `Ensure` to verify the state of the system under test.
|
|
13
13
|
*
|
|
@@ -54,16 +54,16 @@ class Ensure extends core_1.Interaction {
|
|
|
54
54
|
actual;
|
|
55
55
|
expectation;
|
|
56
56
|
/**
|
|
57
|
-
* Creates an
|
|
58
|
-
* verifies if the resolved value of the provided
|
|
59
|
-
* meets the specified
|
|
60
|
-
* If not, it immediately throws an
|
|
57
|
+
* Creates an [interaction](https://serenity-js.org/api/core/class/Interaction/) to `Ensure`, which
|
|
58
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
59
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/).
|
|
60
|
+
* If not, it immediately throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
61
61
|
*
|
|
62
62
|
* @param {Answerable<Actual_Type>} actual
|
|
63
|
-
* An
|
|
63
|
+
* An [`Answerable`](https://serenity-js.org/api/core/#Answerable) describing the actual state of the system.
|
|
64
64
|
*
|
|
65
65
|
* @param {Expectation<Actual_Type>} expectation
|
|
66
|
-
* An
|
|
66
|
+
* An [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) you expect the `actual` value to meet
|
|
67
67
|
*
|
|
68
68
|
* @returns {Ensure<Actual_Type>}
|
|
69
69
|
*/
|
|
@@ -71,19 +71,17 @@ class Ensure extends core_1.Interaction {
|
|
|
71
71
|
return new Ensure(actual, expectation, core_1.Activity.callerLocation(5));
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Creates an
|
|
75
|
-
* verifies if the resolved value of the provided
|
|
76
|
-
* meets the specified
|
|
74
|
+
* Creates an [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`EnsureEventually`](https://serenity-js.org/api/assertions/class/EnsureEventually/),
|
|
75
|
+
* which verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
76
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) within the expected timeframe.
|
|
77
77
|
*
|
|
78
|
-
* If the expectation is not met by the time the timeout expires, the interaction throws an
|
|
79
|
-
* `EnsureEventually` ignores retries the evaluation if resolving the `actual` results in an {@apilink OptionalNotPresentError},
|
|
80
|
-
* but rethrows any other errors.
|
|
78
|
+
* If the expectation is not met by the time the timeout expires, the interaction throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
81
79
|
*
|
|
82
80
|
* @param {Answerable<Actual_Type>} actual
|
|
83
|
-
* An
|
|
81
|
+
* An [`Answerable`](https://serenity-js.org/api/core/#Answerable) describing the actual state of the system.
|
|
84
82
|
*
|
|
85
83
|
* @param {Expectation<Actual_Type>} expectation
|
|
86
|
-
* An
|
|
84
|
+
* An [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) you expect the `actual` value to meet
|
|
87
85
|
*
|
|
88
86
|
* @returns {Ensure<Actual_Type>}
|
|
89
87
|
*/
|
|
@@ -122,11 +120,11 @@ class Ensure extends core_1.Interaction {
|
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
122
|
/**
|
|
125
|
-
* Overrides the default
|
|
123
|
+
* Overrides the default [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/) thrown when
|
|
126
124
|
* the actual value does not meet the expectation.
|
|
127
125
|
*
|
|
128
126
|
* @param typeOfRuntimeError
|
|
129
|
-
* A constructor function producing a subtype of
|
|
127
|
+
* A constructor function producing a subtype of [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/) to throw, e.g. [`TestCompromisedError`](https://serenity-js.org/api/core/class/TestCompromisedError/)
|
|
130
128
|
*
|
|
131
129
|
* @param message
|
|
132
130
|
* The message explaining the failure
|
package/lib/Ensure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ensure.js","sourceRoot":"","sources":["../src/Ensure.ts"],"names":[],"mappings":";;;AAQA,4CAW2B;AAG3B,yDAAsD;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAa,MAAe,SAAQ,kBAAW;
|
|
1
|
+
{"version":3,"file":"Ensure.js","sourceRoot":"","sources":["../src/Ensure.ts"],"names":[],"mappings":";;;AAQA,4CAW2B;AAG3B,yDAAsD;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAa,MAAe,SAAQ,kBAAW;IA6CpB;IACA;IA5CvB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,CAAc,MAA+B,EAAE,WAAqC;QAC3F,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,eAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,UAAU,CAAc,MAA+B,EAAE,WAAqC;QACjG,OAAO,IAAI,mCAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,eAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC;IAED;;;;OAIG;IACH,YACuB,MAA0B,EAC1B,WAAgC,EACnD,QAA4B;QAE5B,KAAK,CAAC,IAAA,UAAG,EAAA,uBAAwB,MAAO,SAAU,WAAY,EAAE,EAAE,QAAQ,CAAC,CAAC;QAJzD,WAAM,GAAN,MAAM,CAAoB;QAC1B,gBAAW,GAAX,WAAW,CAAqB;IAIvD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,KAA2D;QACvE,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAE3E,IAAI,OAAO,YAAY,wBAAiB,EAAE;YACtC,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS;gBAC/C,CAAC,CAAC,WAAW;gBACb,CAAC,CAAC,eAAQ,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEhD,MAAM,OAAO,GAAG,YAAa,iBAAkB,OAAQ,OAAO,CAAC,OAAQ,EAAE,CAAC;YAE1E,MAAM,kBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,qBAAc,EAAE;gBAC/C,OAAO;gBACP,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;gBAC5D,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE;aACzC,CAAC,CAAC;SACN;QAED,IAAI,CAAE,CAAC,OAAO,YAAY,qBAAc,CAAC,EAAE;YACvC,MAAM,IAAI,iBAAU,CAAC,IAAA,QAAC,EAAA,wFAAyF,OAAQ,EAAE,CAAC,CAAC;SAC9H;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,iBAAiB,CAAC,kBAAwE,EAAE,OAAgB;QACxG,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAE9C,OAAO,kBAAW,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;YACpD,IAAI;gBACA,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;aAC/B;YACD,OAAO,KAAK,EAAE;gBACV,MAAM,kBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE;oBACnD,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,OAAO;oBACjC,QAAQ;oBACR,KAAK,EAAE,KAAK;iBACf,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAxGD,wBAwGC"}
|
|
@@ -2,16 +2,16 @@ import type { Answerable, AnswersQuestions, CollectsArtifacts, Expectation, Runt
|
|
|
2
2
|
import { Duration, Interaction } from '@serenity-js/core';
|
|
3
3
|
import type { FileSystemLocation } from '@serenity-js/core/lib/io';
|
|
4
4
|
/**
|
|
5
|
-
* The
|
|
6
|
-
* verifies if the resolved value of the provided
|
|
7
|
-
* meets the specified
|
|
5
|
+
* The [interaction](https://serenity-js.org/api/core/class/Interaction/) to `EnsureEventually`
|
|
6
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
7
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) within the expected timeframe.
|
|
8
8
|
*
|
|
9
|
-
* If the expectation is not met by the time the timeout expires, the interaction throws an
|
|
10
|
-
* `EnsureEventually` retries the evaluation if resolving the `actual` results in an
|
|
9
|
+
* If the expectation is not met by the time the timeout expires, the interaction throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
10
|
+
* `EnsureEventually` retries the evaluation if resolving the `actual` results in an [`ListItemNotFoundError`](https://serenity-js.org/api/core/class/ListItemNotFoundError/),
|
|
11
11
|
* but rethrows any other errors.
|
|
12
12
|
*
|
|
13
13
|
* :::tip Use the factory method
|
|
14
|
-
* Use the factory method
|
|
14
|
+
* Use the factory method [`Ensure.eventually`](https://serenity-js.org/api/assertions/class/Ensure/#eventually] to instantiate this interaction.
|
|
15
15
|
* :::
|
|
16
16
|
*
|
|
17
17
|
* ## Basic usage with dynamic values
|
|
@@ -74,7 +74,7 @@ export declare class EnsureEventually<Actual> extends Interaction {
|
|
|
74
74
|
*/
|
|
75
75
|
constructor(actual: Answerable<Actual>, expectation: Expectation<Actual>, location: FileSystemLocation, timeout?: Duration);
|
|
76
76
|
/**
|
|
77
|
-
* Override the default timeout set via
|
|
77
|
+
* Override the default timeout set via [`SerenityConfig.interactionTimeout`](https://serenity-js.org/api/core/class/SerenityConfig/#interactionTimeout).
|
|
78
78
|
*
|
|
79
79
|
* @param timeout
|
|
80
80
|
*/
|
|
@@ -84,11 +84,11 @@ export declare class EnsureEventually<Actual> extends Interaction {
|
|
|
84
84
|
*/
|
|
85
85
|
performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): Promise<void>;
|
|
86
86
|
/**
|
|
87
|
-
* Overrides the default
|
|
87
|
+
* Overrides the default [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/) thrown when
|
|
88
88
|
* the actual value does not meet the expectation.
|
|
89
89
|
*
|
|
90
90
|
* @param typeOfRuntimeError
|
|
91
|
-
* A constructor function producing a subtype of
|
|
91
|
+
* A constructor function producing a subtype of [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/) to throw, e.g. [`TestCompromisedError`](https://serenity-js.org/api/core/class/TestCompromisedError/)
|
|
92
92
|
*
|
|
93
93
|
* @param message
|
|
94
94
|
* The message explaining the failure
|
package/lib/EnsureEventually.js
CHANGED
|
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnsureEventually = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
7
|
-
* verifies if the resolved value of the provided
|
|
8
|
-
* meets the specified
|
|
6
|
+
* The [interaction](https://serenity-js.org/api/core/class/Interaction/) to `EnsureEventually`
|
|
7
|
+
* verifies if the resolved value of the provided [`Answerable`](https://serenity-js.org/api/core/#Answerable)
|
|
8
|
+
* meets the specified [`Expectation`](https://serenity-js.org/api/core/class/Expectation/) within the expected timeframe.
|
|
9
9
|
*
|
|
10
|
-
* If the expectation is not met by the time the timeout expires, the interaction throws an
|
|
11
|
-
* `EnsureEventually` retries the evaluation if resolving the `actual` results in an
|
|
10
|
+
* If the expectation is not met by the time the timeout expires, the interaction throws an [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/).
|
|
11
|
+
* `EnsureEventually` retries the evaluation if resolving the `actual` results in an [`ListItemNotFoundError`](https://serenity-js.org/api/core/class/ListItemNotFoundError/),
|
|
12
12
|
* but rethrows any other errors.
|
|
13
13
|
*
|
|
14
14
|
* :::tip Use the factory method
|
|
15
|
-
* Use the factory method
|
|
15
|
+
* Use the factory method [`Ensure.eventually`](https://serenity-js.org/api/assertions/class/Ensure/#eventually] to instantiate this interaction.
|
|
16
16
|
* :::
|
|
17
17
|
*
|
|
18
18
|
* ## Basic usage with dynamic values
|
|
@@ -80,7 +80,7 @@ class EnsureEventually extends core_1.Interaction {
|
|
|
80
80
|
this.timeout = timeout;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Override the default timeout set via
|
|
83
|
+
* Override the default timeout set via [`SerenityConfig.interactionTimeout`](https://serenity-js.org/api/core/class/SerenityConfig/#interactionTimeout).
|
|
84
84
|
*
|
|
85
85
|
* @param timeout
|
|
86
86
|
*/
|
|
@@ -117,11 +117,11 @@ class EnsureEventually extends core_1.Interaction {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* Overrides the default
|
|
120
|
+
* Overrides the default [`AssertionError`](https://serenity-js.org/api/core/class/AssertionError/) thrown when
|
|
121
121
|
* the actual value does not meet the expectation.
|
|
122
122
|
*
|
|
123
123
|
* @param typeOfRuntimeError
|
|
124
|
-
* A constructor function producing a subtype of
|
|
124
|
+
* A constructor function producing a subtype of [`RuntimeError`](https://serenity-js.org/api/core/class/RuntimeError/) to throw, e.g. [`TestCompromisedError`](https://serenity-js.org/api/core/class/TestCompromisedError/)
|
|
125
125
|
*
|
|
126
126
|
* @param message
|
|
127
127
|
* The message explaining the failure
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when all the `expectations` are met for the given actual value.
|
|
4
4
|
*
|
|
5
5
|
* Use `and` to combine several expectations using logical "and",
|
|
6
6
|
*
|
package/lib/expectations/and.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.and = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when all the `expectations` are met for the given actual value.
|
|
7
7
|
*
|
|
8
8
|
* Use `and` to combine several expectations using logical "and",
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Produces an
|
|
3
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual array of `Item[]` contains
|
|
4
4
|
* at least one `Item` that is equal to the resolved value of `expected`.
|
|
5
5
|
*
|
|
6
6
|
* Note that the equality check performs comparison **by value**
|
|
@@ -4,7 +4,7 @@ exports.contain = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const objects_1 = require("tiny-types/lib/objects");
|
|
6
6
|
/**
|
|
7
|
-
* Produces an
|
|
7
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual array of `Item[]` contains
|
|
8
8
|
* at least one `Item` that is equal to the resolved value of `expected`.
|
|
9
9
|
*
|
|
10
10
|
* Note that the equality check performs comparison **by value**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Produces an
|
|
3
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual array of `Item[]` contains
|
|
4
4
|
* at least one `Item` for which the `expectation` is met.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that at least one item in an array meets the expectation
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.containAtLeastOneItemThat = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Produces an
|
|
6
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual array of `Item[]` contains
|
|
7
7
|
* at least one `Item` for which the `expectation` is met.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that at least one item in an array meets the expectation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Produces an
|
|
3
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when all the items of the actual array of `Item[]`
|
|
4
4
|
* meet the `expectation`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that all the items in an array meet the expectation
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.containItemsWhereEachItem = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Produces an
|
|
6
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when all the items of the actual array of `Item[]`
|
|
7
7
|
* meet the `expectation`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that all the items in an array meet the expectation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `string` value
|
|
4
4
|
* ends with the resolved value of `expected`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given string ends with an expected substring
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.endsWith = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `string` value
|
|
7
7
|
* ends with the resolved value of `expected`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given string ends with an expected substring
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Produces an
|
|
3
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value
|
|
4
4
|
* is equal to the resolved value of `expectedValue`.
|
|
5
5
|
*
|
|
6
6
|
* Note that the equality check performs comparison **by value**
|
|
@@ -4,7 +4,7 @@ exports.equals = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const objects_1 = require("tiny-types/lib/objects");
|
|
6
6
|
/**
|
|
7
|
-
* Produces an
|
|
7
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value
|
|
8
8
|
* is equal to the resolved value of `expectedValue`.
|
|
9
9
|
*
|
|
10
10
|
* Note that the equality check performs comparison **by value**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `string` value
|
|
4
4
|
* includes a substring of `expected`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given string includes the expected substring
|
|
@@ -16,7 +16,7 @@ import { Expectation } from '@serenity-js/core';
|
|
|
16
16
|
*
|
|
17
17
|
* ## Ensuring that page URL includes the expected substring
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* [`Page.current().url()`](https://serenity-js.org/api/web/class/Page/#url) returns a [`QuestionAdapter<URL>`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
20
20
|
* a proxy object around the standard Node.js [URL](https://nodejs.org/api/url.html) class,
|
|
21
21
|
* offering access to `string` properties such as [`hostname`](https://nodejs.org/api/url.html#urlobjecthostname),
|
|
22
22
|
* [`pathname`](https://nodejs.org/api/url.html#urlobjectpathname), and so on.
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.includes = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `string` value
|
|
7
7
|
* includes a substring of `expected`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given string includes the expected substring
|
|
@@ -19,7 +19,7 @@ const core_1 = require("@serenity-js/core");
|
|
|
19
19
|
*
|
|
20
20
|
* ## Ensuring that page URL includes the expected substring
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* [`Page.current().url()`](https://serenity-js.org/api/web/class/Page/#url) returns a [`QuestionAdapter<URL>`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
23
23
|
* a proxy object around the standard Node.js [URL](https://nodejs.org/api/url.html) class,
|
|
24
24
|
* offering access to `string` properties such as [`hostname`](https://nodejs.org/api/url.html#urlobjecthostname),
|
|
25
25
|
* [`pathname`](https://nodejs.org/api/url.html#urlobjectpathname), and so on.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation, type Timestamp } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `Date`
|
|
4
4
|
* is after the expected `Date`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given date is after the expected date
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isAfter = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `Date`
|
|
7
7
|
* is after the expected `Date`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given date is after the expected date
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation, type Timestamp } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `Date`
|
|
4
4
|
* is before the expected `Date`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given date is after the expected date
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isBefore = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `Date`
|
|
7
7
|
* is before the expected `Date`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given date is after the expected date
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Produces an
|
|
3
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value
|
|
4
4
|
* is within a given ± `absoluteTolerance` range of the `expected` value.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given floating point number is close to the expected number
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isCloseTo = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Produces an
|
|
6
|
+
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value
|
|
7
7
|
* is within a given ± `absoluteTolerance` range of the `expected` value.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given floating point number is close to the expected number
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `boolean` value
|
|
4
4
|
* is `false`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given value is false
|
|
@@ -4,7 +4,7 @@ exports.isFalse = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const equals_1 = require("./equals");
|
|
6
6
|
/**
|
|
7
|
-
* Creates an
|
|
7
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual `boolean` value
|
|
8
8
|
* is `false`.
|
|
9
9
|
*
|
|
10
10
|
* ## Ensuring that a given value is false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `number`
|
|
4
4
|
* is greater than the expected `number`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given number is greater than the expected number
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isGreaterThan = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `number`
|
|
7
7
|
* is greater than the expected `number`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given number is greater than the expected number
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `number`
|
|
4
4
|
* is less than the expected `number`.
|
|
5
5
|
*
|
|
6
6
|
* ## Ensuring that a given number is less than the expected number
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isLessThan = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Creates an
|
|
6
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual value of type `number`
|
|
7
7
|
* is less than the expected `number`.
|
|
8
8
|
*
|
|
9
9
|
* ## Ensuring that a given number is less than the expected number
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Expectation } from '@serenity-js/core';
|
|
2
2
|
/**
|
|
3
|
-
* Creates an
|
|
3
|
+
* Creates an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the `actual` value is not undefined or null.
|
|
4
4
|
*
|
|
5
|
-
* Also, when the `actual` implements
|
|
6
|
-
*
|
|
5
|
+
* Also, when the `actual` implements [`Optional`](https://serenity-js.org/api/core/interface/Optional/),
|
|
6
|
+
* the expectation is met when calling [`Optional.isPresent`](https://serenity-js.org/api/core/interface/Optional/#isPresent)
|
|
7
|
+
* returns an [`Answerable`](https://serenity-js.org/api/core/#Answerable) that resolves to `true`
|
|
7
8
|
*
|
|
8
9
|
* ## Ensuring that a value is defined
|
|
9
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPresent.d.ts","sourceRoot":"","sources":["../../src/expectations/isPresent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAyD,MAAM,mBAAmB,CAAC;AAEvG
|
|
1
|
+
{"version":3,"file":"isPresent.d.ts","sourceRoot":"","sources":["../../src/expectations/isPresent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAyD,MAAM,mBAAmB,CAAC;AAEvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,wBAAgB,SAAS,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,CAAC,CAEvD"}
|