@serenity-js/assertions 3.1.3 → 3.1.6
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
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.1.6](https://github.com/serenity-js/serenity-js/compare/v3.1.5...v3.1.6) (2023-04-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **webdriverio:** upgraded to TypeScript 5 and WebdriverIO 7.31.1 ([15b1ba7](https://github.com/serenity-js/serenity-js/commit/15b1ba77e157d77123a2e8922414e937c0d2869d)), closes [#1558](https://github.com/serenity-js/serenity-js/issues/1558) [#1651](https://github.com/serenity-js/serenity-js/issues/1651)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.1.5](https://github.com/serenity-js/serenity-js/compare/v3.1.4...v3.1.5) (2023-04-18)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @serenity-js/assertions
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [3.1.3](https://github.com/serenity-js/serenity-js/compare/v3.1.2...v3.1.3) (2023-04-14)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @serenity-js/assertions
|
|
@@ -20,5 +20,5 @@ import { Expectation } from '@serenity-js/core';
|
|
|
20
20
|
*
|
|
21
21
|
* @group Expectations
|
|
22
22
|
*/
|
|
23
|
-
export declare const isCloseTo: (
|
|
23
|
+
export declare const isCloseTo: (expected: import("@serenity-js/core").Answerable<number>, absoluteTolerance?: import("@serenity-js/core").Answerable<number>) => Expectation<number>;
|
|
24
24
|
//# sourceMappingURL=isCloseTo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCloseTo.d.ts","sourceRoot":"","sources":["../../src/expectations/isCloseTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"isCloseTo.d.ts","sourceRoot":"","sources":["../../src/expectations/isCloseTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,uJAiBrB,CAAA"}
|
|
@@ -23,7 +23,9 @@ const core_1 = require("@serenity-js/core");
|
|
|
23
23
|
*
|
|
24
24
|
* @group Expectations
|
|
25
25
|
*/
|
|
26
|
-
exports.isCloseTo = core_1.Expectation.define('isCloseTo', (expected, absoluteTolerance = 1e-9) => (0, core_1.d) `have value close to ${expected} ±${absoluteTolerance}`,
|
|
26
|
+
exports.isCloseTo = core_1.Expectation.define('isCloseTo', (expected, absoluteTolerance = 1e-9) => (0, core_1.d) `have value close to ${expected} ±${absoluteTolerance}`,
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
28
|
+
(actual, expected, absoluteTolerance = 1e-9) => {
|
|
27
29
|
// short-circuit exact equality
|
|
28
30
|
if (actual === expected) {
|
|
29
31
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isCloseTo.js","sourceRoot":"","sources":["../../src/expectations/isCloseTo.ts"],"names":[],"mappings":";;;AAAA,4CAAmD;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACU,QAAA,SAAS,GAAG,kBAAW,CAAC,MAAM,CACvC,WAAW,EAAE,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,EAAE,EAAE,CAAC,IAAA,QAAC,EAAA,uBAAwB,QAAS,KAAM,iBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"isCloseTo.js","sourceRoot":"","sources":["../../src/expectations/isCloseTo.ts"],"names":[],"mappings":";;;AAAA,4CAAmD;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACU,QAAA,SAAS,GAAG,kBAAW,CAAC,MAAM,CACvC,WAAW,EAAE,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,EAAE,EAAE,CAAC,IAAA,QAAC,EAAA,uBAAwB,QAAS,KAAM,iBAAkB,EAAE;AACjH,kEAAkE;AAClE,CAAC,MAAc,EAAE,QAAgB,EAAE,oBAA4B,IAAI,EAAE,EAAE;IACnE,+BAA+B;IAC/B,IAAI,MAAM,KAAK,QAAQ,EAAE;QACrB,OAAO,IAAI,CAAC;KACf;IAED,IAAI,CAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE;QAC1D,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAA;IAE9C,OAAO,UAAU,IAAI,iBAAiB,CAAC;AAC3C,CAAC,CACJ,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/assertions",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "Screenplay-style assertion library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"npm": "^6 || ^7 || ^8 || ^9"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@serenity-js/core": "3.1.
|
|
46
|
+
"@serenity-js/core": "3.1.6",
|
|
47
47
|
"tiny-types": "^1.19.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"mocha-multi": "^1.1.7",
|
|
55
55
|
"nyc": "15.1.0",
|
|
56
56
|
"ts-node": "^10.9.1",
|
|
57
|
-
"typescript": "^
|
|
57
|
+
"typescript": "^5.0.4"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "825ecf4f0dd507e78da8b0634f659ecd3ddfb976"
|
|
60
60
|
}
|
|
@@ -23,7 +23,8 @@ import { d, Expectation } from '@serenity-js/core';
|
|
|
23
23
|
*/
|
|
24
24
|
export const isCloseTo = Expectation.define(
|
|
25
25
|
'isCloseTo', (expected, absoluteTolerance = 1e-9) => d`have value close to ${ expected } ±${ absoluteTolerance }`,
|
|
26
|
-
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
27
|
+
(actual: number, expected: number, absoluteTolerance: number = 1e-9) => {
|
|
27
28
|
// short-circuit exact equality
|
|
28
29
|
if (actual === expected) {
|
|
29
30
|
return true;
|