@plugjs/expect5 0.4.3 → 0.4.5
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/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/execution/executor.cjs.map +1 -1
- package/dist/execution/executor.d.ts +1 -1
- package/dist/execution/executor.mjs +1 -1
- package/dist/execution/executor.mjs.map +1 -1
- package/dist/execution/setup.cjs.map +1 -1
- package/dist/execution/setup.d.ts +1 -1
- package/dist/execution/setup.mjs +1 -1
- package/dist/execution/setup.mjs.map +1 -1
- package/dist/expectation/async.cjs +58 -45
- package/dist/expectation/async.cjs.map +1 -1
- package/dist/expectation/async.d.ts +53 -52
- package/dist/expectation/async.mjs +59 -42
- package/dist/expectation/async.mjs.map +1 -1
- package/dist/expectation/diff.cjs.map +1 -1
- package/dist/expectation/diff.mjs +6 -1
- package/dist/expectation/diff.mjs.map +1 -1
- package/dist/expectation/expect.cjs +11 -165
- package/dist/expectation/expect.cjs.map +2 -2
- package/dist/expectation/expect.d.ts +10 -112
- package/dist/expectation/expect.mjs +12 -207
- package/dist/expectation/expect.mjs.map +2 -2
- package/dist/expectation/expectations.cjs +549 -0
- package/dist/expectation/expectations.cjs.map +6 -0
- package/dist/expectation/expectations.d.ts +454 -0
- package/dist/expectation/expectations.mjs +530 -0
- package/dist/expectation/expectations.mjs.map +6 -0
- package/dist/expectation/include.cjs +43 -41
- package/dist/expectation/include.cjs.map +1 -1
- package/dist/expectation/include.d.ts +3 -19
- package/dist/expectation/include.mjs +43 -41
- package/dist/expectation/include.mjs.map +1 -1
- package/dist/expectation/matchers.cjs +350 -0
- package/dist/expectation/matchers.cjs.map +6 -0
- package/dist/expectation/matchers.d.ts +375 -0
- package/dist/expectation/matchers.mjs +328 -0
- package/dist/expectation/matchers.mjs.map +6 -0
- package/dist/expectation/print.cjs.map +1 -1
- package/dist/expectation/print.d.ts +2 -2
- package/dist/expectation/print.mjs.map +1 -1
- package/dist/expectation/types.cjs +17 -23
- package/dist/expectation/types.cjs.map +1 -1
- package/dist/expectation/types.d.ts +7 -51
- package/dist/expectation/types.mjs +17 -22
- package/dist/expectation/types.mjs.map +1 -1
- package/dist/globals.d.ts +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +11 -12
- package/dist/index.mjs.map +1 -1
- package/dist/test.cjs +34 -5
- package/dist/test.cjs.map +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.mjs +35 -6
- package/dist/test.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cli.mts +1 -1
- package/src/execution/executor.ts +1 -3
- package/src/execution/setup.ts +1 -3
- package/src/expectation/async.ts +116 -145
- package/src/expectation/diff.ts +7 -3
- package/src/expectation/expect.ts +22 -362
- package/src/expectation/expectations.ts +971 -0
- package/src/expectation/include.ts +59 -75
- package/src/expectation/matchers.ts +698 -0
- package/src/expectation/print.ts +8 -4
- package/src/expectation/types.ts +22 -94
- package/src/globals.ts +2 -2
- package/src/index.ts +17 -10
- package/src/test.ts +34 -10
- package/dist/expectation/basic.cjs +0 -188
- package/dist/expectation/basic.cjs.map +0 -6
- package/dist/expectation/basic.d.ts +0 -90
- package/dist/expectation/basic.mjs +0 -156
- package/dist/expectation/basic.mjs.map +0 -6
- package/dist/expectation/throwing.cjs +0 -58
- package/dist/expectation/throwing.cjs.map +0 -6
- package/dist/expectation/throwing.d.ts +0 -36
- package/dist/expectation/throwing.mjs +0 -32
- package/dist/expectation/throwing.mjs.map +0 -6
- package/dist/expectation/trivial.cjs +0 -96
- package/dist/expectation/trivial.cjs.map +0 -6
- package/dist/expectation/trivial.d.ts +0 -13
- package/dist/expectation/trivial.mjs +0 -61
- package/dist/expectation/trivial.mjs.map +0 -6
- package/src/expectation/basic.ts +0 -409
- package/src/expectation/throwing.ts +0 -106
- package/src/expectation/trivial.ts +0 -107
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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AAS,IAAI,GAAG,CAAC;AACtD,YAAI,OAAO;AAAM,mBAAS,KAAK,CAAE,KAAK,MAAO,CAAC;AAAA,MAChD;AAAA,IACF;AAAA,EACF;AAEA,QAAM,QAAQ,SAAS;AACvB,MAAI,UAAU;AAAG;AAEjB,QAAM,OAAO,UAAU,IAAI,YAAY;AACvC,QAAM,MAAM,WAAW,SAAS;AAChC,QAAM,IAAI,8BAAiB,cAAc,GAAG,iBAAiB,SAAS,QAAQ;AAAA,IAC5E,MAAM;AAAA,IACN,OAAO,aAAa;AAAA,IACpB;AAAA,EACF,CAAC;AACH;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function toInclude
|
|
3
|
-
|
|
4
|
-
declare function toInclude<T>(this: T, mappings: Map<any, any>): T;
|
|
5
|
-
/** Expect the value to include _all_ values from the specified {@link Set}. */
|
|
6
|
-
declare function toInclude<T>(this: T, entries: Set<any>): T;
|
|
7
|
-
/** Expect the value to include _all_ values in any order from the specified _array_. */
|
|
8
|
-
declare function toInclude<T>(this: T, values: any[]): T;
|
|
9
|
-
/**
|
|
10
|
-
* Expect the value to include _all_ values (and only those values, in any
|
|
11
|
-
* order) from the specified _array_.
|
|
12
|
-
*/
|
|
13
|
-
declare function toMatchContents<T>(this: T, contents: any[]): T;
|
|
14
|
-
/**
|
|
15
|
-
* Expect the value to include _all_ values (and only those values, in any
|
|
16
|
-
* order) from the specified {@link Set}.
|
|
17
|
-
*/
|
|
18
|
-
declare function toMatchContents<T>(this: T, contents: Set<any>): T;
|
|
19
|
-
export { toInclude, toMatchContents, };
|
|
1
|
+
import { type Expectations } from './expectations';
|
|
2
|
+
export declare function toInclude(expectations: Expectations, negative: boolean, contents: Record<string, any> | Map<any, any> | Set<any> | any[]): void;
|
|
3
|
+
export declare function toMatchContents(expectations: Expectations, contents: any[] | Set<any>): void;
|
|
@@ -5,45 +5,45 @@ import {
|
|
|
5
5
|
stringifyObjectType,
|
|
6
6
|
stringifyValue
|
|
7
7
|
} from "./types.mjs";
|
|
8
|
-
function toInclude(
|
|
9
|
-
if (
|
|
10
|
-
return includesMappings(
|
|
11
|
-
if (
|
|
12
|
-
return includesValues(
|
|
13
|
-
if (Array.isArray(
|
|
14
|
-
return includesValues(
|
|
15
|
-
if (
|
|
16
|
-
return includesProps(
|
|
17
|
-
throw new TypeError(`Invalid type for "toInclude(...)": ${stringifyValue(
|
|
8
|
+
function toInclude(expectations, negative, contents) {
|
|
9
|
+
if (contents instanceof Map)
|
|
10
|
+
return includesMappings(expectations, negative, contents);
|
|
11
|
+
if (contents instanceof Set)
|
|
12
|
+
return includesValues(expectations, negative, contents);
|
|
13
|
+
if (Array.isArray(contents))
|
|
14
|
+
return includesValues(expectations, negative, new Set(contents));
|
|
15
|
+
if (contents instanceof Object)
|
|
16
|
+
return includesProps(expectations, negative, contents);
|
|
17
|
+
throw new TypeError(`Invalid type for "toInclude(...)": ${stringifyValue(contents)}`);
|
|
18
18
|
}
|
|
19
|
-
function toMatchContents(contents) {
|
|
19
|
+
function toMatchContents(expectations, contents) {
|
|
20
20
|
let actual;
|
|
21
21
|
let expected;
|
|
22
22
|
try {
|
|
23
|
-
actual = new Set(
|
|
23
|
+
actual = new Set(expectations.value);
|
|
24
24
|
expected = new Set(contents);
|
|
25
25
|
} catch (error) {
|
|
26
|
-
throw new ExpectationError(
|
|
26
|
+
throw new ExpectationError(expectations, "to be an iterable object");
|
|
27
27
|
}
|
|
28
28
|
const result = diff(actual, expected);
|
|
29
29
|
delete result.error;
|
|
30
|
-
if (result.diff
|
|
31
|
-
return
|
|
30
|
+
if (!result.diff)
|
|
31
|
+
return;
|
|
32
32
|
throw new ExpectationError(
|
|
33
|
-
|
|
33
|
+
expectations,
|
|
34
34
|
`to match contents of ${stringifyObjectType(contents)}`,
|
|
35
|
-
{ ...result, value:
|
|
35
|
+
{ ...result, value: expectations.value }
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
function includesProps(
|
|
39
|
-
if (
|
|
40
|
-
return includesMappings(
|
|
38
|
+
function includesProps(expectations, negative, expected) {
|
|
39
|
+
if (expectations.value instanceof Map) {
|
|
40
|
+
return includesMappings(expectations, negative, new Map(Object.entries(expected)));
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
const actual =
|
|
42
|
+
expectations.toBeInstanceOf(Object);
|
|
43
|
+
const actual = expectations.value;
|
|
44
44
|
const keys = new Set(Object.keys(expected));
|
|
45
45
|
const props = {};
|
|
46
|
-
if (
|
|
46
|
+
if (negative) {
|
|
47
47
|
for (const key of keys) {
|
|
48
48
|
if (actual[key] !== void 0 || key in actual) {
|
|
49
49
|
props[key] = { diff: true, extra: actual[key] };
|
|
@@ -65,22 +65,23 @@ function includesProps(context, expected) {
|
|
|
65
65
|
}
|
|
66
66
|
const count = Object.keys(props).length;
|
|
67
67
|
if (count === 0)
|
|
68
|
-
return
|
|
68
|
+
return;
|
|
69
69
|
const type = count === 1 ? "property" : "properties";
|
|
70
|
-
|
|
70
|
+
const not = negative ? "not " : "";
|
|
71
|
+
throw new ExpectationError(expectations, `${not}to include ${count} ${type}`, {
|
|
71
72
|
diff: true,
|
|
72
73
|
value: actual,
|
|
73
74
|
props
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
|
-
function includesValues(
|
|
77
|
-
|
|
78
|
-
if (typeof
|
|
79
|
-
throw new ExpectationError(
|
|
77
|
+
function includesValues(expectations, negative, expected) {
|
|
78
|
+
expectations.toBeInstanceOf(Object);
|
|
79
|
+
if (typeof expectations.value[Symbol.iterator] !== "function") {
|
|
80
|
+
throw new ExpectationError(expectations, "to be an iterable object");
|
|
80
81
|
}
|
|
81
|
-
const actual = new Set(
|
|
82
|
+
const actual = new Set(expectations.value);
|
|
82
83
|
const values = [];
|
|
83
|
-
if (
|
|
84
|
+
if (negative) {
|
|
84
85
|
for (const exp of expected) {
|
|
85
86
|
for (const act of actual) {
|
|
86
87
|
const result = diff(act, exp);
|
|
@@ -107,20 +108,20 @@ function includesValues(context, expected) {
|
|
|
107
108
|
}
|
|
108
109
|
const count = values.length;
|
|
109
110
|
if (count === 0)
|
|
110
|
-
return
|
|
111
|
+
return;
|
|
111
112
|
const type = count === 1 ? "value" : "values";
|
|
112
|
-
|
|
113
|
+
const not = negative ? "not " : "";
|
|
114
|
+
throw new ExpectationError(expectations, `${not}to include ${count} ${type}`, {
|
|
113
115
|
diff: true,
|
|
114
|
-
value:
|
|
116
|
+
value: expectations.value,
|
|
115
117
|
values
|
|
116
118
|
});
|
|
117
119
|
}
|
|
118
|
-
function includesMappings(
|
|
119
|
-
|
|
120
|
-
const actual = context.value;
|
|
120
|
+
function includesMappings(expectations, negative, expected) {
|
|
121
|
+
const actual = expectations.toBeInstanceOf(Map).value;
|
|
121
122
|
const keys = new Set(expected.keys());
|
|
122
123
|
const mappings = [];
|
|
123
|
-
if (
|
|
124
|
+
if (negative) {
|
|
124
125
|
for (const key of keys) {
|
|
125
126
|
if (actual.has(key)) {
|
|
126
127
|
mappings.push([key, { diff: true, extra: actual.get(key) }]);
|
|
@@ -139,11 +140,12 @@ function includesMappings(context, expected) {
|
|
|
139
140
|
}
|
|
140
141
|
const count = mappings.length;
|
|
141
142
|
if (count === 0)
|
|
142
|
-
return
|
|
143
|
+
return;
|
|
143
144
|
const type = count === 1 ? "mapping" : "mappings";
|
|
144
|
-
|
|
145
|
+
const not = negative ? "not " : "";
|
|
146
|
+
throw new ExpectationError(expectations, `${not}to include ${count} ${type}`, {
|
|
145
147
|
diff: true,
|
|
146
|
-
value:
|
|
148
|
+
value: expectations.value,
|
|
147
149
|
mappings
|
|
148
150
|
});
|
|
149
151
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/expectation/include.ts"],
|
|
4
|
-
"mappings": ";AAAA,SAAS,
|
|
4
|
+
"mappings": ";AAAA,SAAS,YAAuB;AAEhC;AAAA,EACE;AAAA,EACA;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QAAM,IAAI,iBAAiB,cAAc,GAAG,iBAAiB,SAAS,QAAQ;AAAA,IAC5E,MAAM;AAAA,IACN,OAAO,aAAa;AAAA,IACpB;AAAA,EACF,CAAC;AACH;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// expectation/matchers.ts
|
|
21
|
+
var matchers_exports = {};
|
|
22
|
+
__export(matchers_exports, {
|
|
23
|
+
Matchers: () => Matchers,
|
|
24
|
+
NegativeMatchers: () => NegativeMatchers
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(matchers_exports);
|
|
27
|
+
var import_expectations = require("./expectations.cjs");
|
|
28
|
+
var import_types = require("./types.cjs");
|
|
29
|
+
var Matchers = class {
|
|
30
|
+
_matchers;
|
|
31
|
+
not;
|
|
32
|
+
constructor() {
|
|
33
|
+
const matchers = [];
|
|
34
|
+
this.not = new NegativeMatchers(this, matchers);
|
|
35
|
+
this._matchers = matchers;
|
|
36
|
+
}
|
|
37
|
+
expect(value) {
|
|
38
|
+
let expectations = new import_expectations.Expectations(value, void 0);
|
|
39
|
+
for (const matcher of this._matchers) {
|
|
40
|
+
expectations = matcher(expectations);
|
|
41
|
+
}
|
|
42
|
+
return expectations.value;
|
|
43
|
+
}
|
|
44
|
+
_push(matcher) {
|
|
45
|
+
const matchers = new Matchers();
|
|
46
|
+
matchers._matchers.push(...this._matchers, matcher);
|
|
47
|
+
return matchers;
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.prototype[import_types.matcherMarker] = import_types.matcherMarker;
|
|
51
|
+
}
|
|
52
|
+
/* ------------------------------------------------------------------------ *
|
|
53
|
+
* BASIC *
|
|
54
|
+
* ------------------------------------------------------------------------ */
|
|
55
|
+
/**
|
|
56
|
+
* Expects the value to be of the specified _extended_ {@link TypeName type},
|
|
57
|
+
* and (if specified) further asserts it with an {@link AssertionFunction}.
|
|
58
|
+
*
|
|
59
|
+
* Negation: {@link NegativeMatchers.toBeA `not.toBeA(...)`}
|
|
60
|
+
*/
|
|
61
|
+
toBeA(type, assertion) {
|
|
62
|
+
return this._push((e) => e.toBeA(type, assertion));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Expects the value to be a `number` or `bigint` within a given +/- _delta_
|
|
66
|
+
* range of the specified expected value.
|
|
67
|
+
*
|
|
68
|
+
* Negation: {@link NegativeMatchers.toBeCloseTo `not.toBeCloseTo(...)`}
|
|
69
|
+
*/
|
|
70
|
+
toBeCloseTo(value, delta) {
|
|
71
|
+
return this._push((e) => e.toBeCloseTo(value, delta));
|
|
72
|
+
}
|
|
73
|
+
/* ------------------------------------------------------------------------ */
|
|
74
|
+
/**
|
|
75
|
+
* Expects the value to be neither `null` nor `undefined`.
|
|
76
|
+
*
|
|
77
|
+
* Negation: {@link NegativeMatchers.toBeDefined `not.toBeDefined()`}
|
|
78
|
+
*/
|
|
79
|
+
toBeDefined() {
|
|
80
|
+
return this._push((e) => e.toBeDefined());
|
|
81
|
+
}
|
|
82
|
+
toBeError(constructorOrMessage, maybeMessage) {
|
|
83
|
+
const [constructor, message] = typeof constructorOrMessage === "function" ? [constructorOrMessage, maybeMessage] : [Error, constructorOrMessage];
|
|
84
|
+
return this._push((e) => e.toBeError(constructor, message));
|
|
85
|
+
}
|
|
86
|
+
/* ------------------------------------------------------------------------ */
|
|
87
|
+
/** Expects the value strictly equal to `false`. */
|
|
88
|
+
toBeFalse() {
|
|
89
|
+
return this._push((e) => e.toBeFalse());
|
|
90
|
+
}
|
|
91
|
+
/* ------------------------------------------------------------------------ */
|
|
92
|
+
/**
|
|
93
|
+
* Expects the value to be _falsy_ (zero, empty string, `false`, ...).
|
|
94
|
+
*
|
|
95
|
+
* Negation: {@link Matchers.toBeTruthy `toBeTruthy()`}
|
|
96
|
+
*/
|
|
97
|
+
toBeFalsy() {
|
|
98
|
+
return this._push((e) => e.toBeFalsy());
|
|
99
|
+
}
|
|
100
|
+
toBeGreaterThan(value) {
|
|
101
|
+
return this._push((e) => e.toBeGreaterThan(value));
|
|
102
|
+
}
|
|
103
|
+
toBeGreaterThanOrEqual(value) {
|
|
104
|
+
return this._push((e) => e.toBeGreaterThanOrEqual(value));
|
|
105
|
+
}
|
|
106
|
+
/* ------------------------------------------------------------------------ */
|
|
107
|
+
/**
|
|
108
|
+
* Expects the value to be an instance of the specified {@link Constructor},
|
|
109
|
+
* and (if specified) further asserts it with an {@link AssertionFunction}.
|
|
110
|
+
*
|
|
111
|
+
* Negation: {@link NegativeMatchers.toBeInstanceOf `not.toInstanceOf(...)`}
|
|
112
|
+
*/
|
|
113
|
+
toBeInstanceOf(constructor, assertion) {
|
|
114
|
+
return this._push((e) => e.toBeInstanceOf(constructor, assertion));
|
|
115
|
+
}
|
|
116
|
+
toBeLessThan(value) {
|
|
117
|
+
return this._push((e) => e.toBeLessThan(value));
|
|
118
|
+
}
|
|
119
|
+
toBeLessThanOrEqual(value) {
|
|
120
|
+
return this._push((e) => e.toBeLessThanOrEqual(value));
|
|
121
|
+
}
|
|
122
|
+
/* ------------------------------------------------------------------------ */
|
|
123
|
+
/**
|
|
124
|
+
* Expects the value to be `NaN`.
|
|
125
|
+
*
|
|
126
|
+
* Negation: {@link NegativeMatchers.toBeNaN `not.toBeNaN()`}
|
|
127
|
+
*/
|
|
128
|
+
toBeNaN() {
|
|
129
|
+
return this._push((e) => e.toBeNaN());
|
|
130
|
+
}
|
|
131
|
+
/* ------------------------------------------------------------------------ */
|
|
132
|
+
/** Expects the value to strictly equal `null`. */
|
|
133
|
+
toBeNull() {
|
|
134
|
+
return this._push((e) => e.toBeNull());
|
|
135
|
+
}
|
|
136
|
+
/* ------------------------------------------------------------------------ */
|
|
137
|
+
/** Expects the value to strictly equal `true`. */
|
|
138
|
+
toBeTrue() {
|
|
139
|
+
return this._push((e) => e.toBeTrue());
|
|
140
|
+
}
|
|
141
|
+
/* ------------------------------------------------------------------------ */
|
|
142
|
+
/**
|
|
143
|
+
* Expects the value to be _falsy_ (non-zero, non-empty string, ...).
|
|
144
|
+
*
|
|
145
|
+
* Negation: {@link Matchers.toBeFalsy `toBeFalsy()`}
|
|
146
|
+
*/
|
|
147
|
+
toBeTruthy() {
|
|
148
|
+
return this._push((e) => e.toBeTruthy());
|
|
149
|
+
}
|
|
150
|
+
/* ------------------------------------------------------------------------ */
|
|
151
|
+
/** Expects the value to strictly equal `undefined`. */
|
|
152
|
+
toBeUndefined() {
|
|
153
|
+
return this._push((e) => e.toBeUndefined());
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Expects the value to be a `number` or `bigint` within the specified range
|
|
157
|
+
* where minimum and maximum values are inclusive.
|
|
158
|
+
*
|
|
159
|
+
* Negation: {@link NegativeMatchers.toBeWithinRange `not.toBeWithinRange(...)`}
|
|
160
|
+
*/
|
|
161
|
+
toBeWithinRange(min, max) {
|
|
162
|
+
return this._push((e) => e.toBeWithinRange(min, max));
|
|
163
|
+
}
|
|
164
|
+
/* ------------------------------------------------------------------------ */
|
|
165
|
+
/**
|
|
166
|
+
* Expects the value to be _deep equal to_ the specified expected one.
|
|
167
|
+
*
|
|
168
|
+
* Negation: {@link NegativeMatchers.toEqual `not.toEqual(...)`}
|
|
169
|
+
*/
|
|
170
|
+
toEqual(expected) {
|
|
171
|
+
return this._push((e) => e.toEqual(expected));
|
|
172
|
+
}
|
|
173
|
+
/* ------------------------------------------------------------------------ */
|
|
174
|
+
/**
|
|
175
|
+
* Expects the value to have a `number` _property_ `length` with the specified
|
|
176
|
+
* expected value.
|
|
177
|
+
*
|
|
178
|
+
* Negation: {@link NegativeMatchers.toHaveLength `not.toHaveLength(...)`}
|
|
179
|
+
*/
|
|
180
|
+
toHaveLength(length) {
|
|
181
|
+
return this._push((e) => e.toHaveLength(length));
|
|
182
|
+
}
|
|
183
|
+
/* ------------------------------------------------------------------------ */
|
|
184
|
+
/**
|
|
185
|
+
* Expects the value to have the specified _property_ and (if specified)
|
|
186
|
+
* further asserts its value with an {@link AssertionFunction}.
|
|
187
|
+
*
|
|
188
|
+
* Negation: {@link NegativeMatchers.toHaveProperty `not.toHaveProperty(...)`}
|
|
189
|
+
*/
|
|
190
|
+
toHaveProperty(property, assertion) {
|
|
191
|
+
return this._push((e) => e.toHaveProperty(property, assertion));
|
|
192
|
+
}
|
|
193
|
+
/* ------------------------------------------------------------------------ */
|
|
194
|
+
/**
|
|
195
|
+
* Expects the value to have a `number` _property_ `size` with the specified
|
|
196
|
+
* expected value.
|
|
197
|
+
*
|
|
198
|
+
* Negation: {@link NegativeMatchers.toHaveSize `not.toHaveSize(...)`}
|
|
199
|
+
*/
|
|
200
|
+
toHaveSize(size) {
|
|
201
|
+
return this._push((e) => e.toHaveSize(size));
|
|
202
|
+
}
|
|
203
|
+
toInclude(contents) {
|
|
204
|
+
return this._push((e) => e.toInclude(contents));
|
|
205
|
+
}
|
|
206
|
+
/* ------------------------------------------------------------------------ */
|
|
207
|
+
/**
|
|
208
|
+
* Expects the value to be a `string` _matching_ the specified sub-`string`
|
|
209
|
+
* or {@link RegExp}.
|
|
210
|
+
*
|
|
211
|
+
* Negation: {@link NegativeMatchers.toMatch `not.toMatch(...)`}
|
|
212
|
+
*/
|
|
213
|
+
toMatch(matcher) {
|
|
214
|
+
return this._push((e) => e.toMatch(matcher));
|
|
215
|
+
}
|
|
216
|
+
toMatchContents(contents) {
|
|
217
|
+
return this._push((e) => e.toMatchContents(contents));
|
|
218
|
+
}
|
|
219
|
+
/* ------------------------------------------------------------------------ */
|
|
220
|
+
/**
|
|
221
|
+
* Expects the value to be _strictly equal to_ the specified expected one.
|
|
222
|
+
*
|
|
223
|
+
* Negation: {@link NegativeMatchers.toStrictlyEqual `not.toStrictlyEqual(...)`}
|
|
224
|
+
*/
|
|
225
|
+
toStrictlyEqual(expected) {
|
|
226
|
+
return this._push((e) => e.toStrictlyEqual(expected));
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
var NegativeMatchers = class {
|
|
230
|
+
constructor(_instance, _matchers) {
|
|
231
|
+
this._instance = _instance;
|
|
232
|
+
this._matchers = _matchers;
|
|
233
|
+
}
|
|
234
|
+
_push(matcher) {
|
|
235
|
+
this._matchers.push((expectations) => matcher(expectations.not));
|
|
236
|
+
return this._instance;
|
|
237
|
+
}
|
|
238
|
+
/* ------------------------------------------------------------------------ */
|
|
239
|
+
/**
|
|
240
|
+
* Expects the value _**NOT**_ to be of the specified _extended_
|
|
241
|
+
* {@link TypeName type}.
|
|
242
|
+
*
|
|
243
|
+
* Negates: {@link Matchers.toBeA `toBeA(...)`}
|
|
244
|
+
*/
|
|
245
|
+
toBeA(type) {
|
|
246
|
+
return this._push((e) => e.toBeA(type));
|
|
247
|
+
}
|
|
248
|
+
toBeCloseTo(value, delta) {
|
|
249
|
+
return this._push((e) => e.toBeCloseTo(value, delta));
|
|
250
|
+
}
|
|
251
|
+
/* ------------------------------------------------------------------------ */
|
|
252
|
+
/**
|
|
253
|
+
* Expects the value to be either `null` or `undefined`.
|
|
254
|
+
*
|
|
255
|
+
* Negates: {@link Matchers.toBeDefined `toBeDefined()`}
|
|
256
|
+
*/
|
|
257
|
+
toBeDefined() {
|
|
258
|
+
return this._push((e) => e.toBeDefined());
|
|
259
|
+
}
|
|
260
|
+
/* ------------------------------------------------------------------------ */
|
|
261
|
+
/**
|
|
262
|
+
* Expects the value _**NOT**_ to be an instance of the specified
|
|
263
|
+
* {@link Constructor}.
|
|
264
|
+
*
|
|
265
|
+
* Negates: {@link Matchers.toBeInstanceOf `toBeInstanceOf(...)`}
|
|
266
|
+
*/
|
|
267
|
+
toBeInstanceOf(constructor) {
|
|
268
|
+
return this._push((e) => e.toBeInstanceOf(constructor));
|
|
269
|
+
}
|
|
270
|
+
/* ------------------------------------------------------------------------ */
|
|
271
|
+
/**
|
|
272
|
+
* Expects the value _**NOT**_ to be `NaN`.
|
|
273
|
+
*
|
|
274
|
+
* Negates: {@link Matchers.toBeNaN `toBeNaN()`}
|
|
275
|
+
*/
|
|
276
|
+
toBeNaN() {
|
|
277
|
+
return this._push((e) => e.toBeNaN());
|
|
278
|
+
}
|
|
279
|
+
toBeWithinRange(min, max) {
|
|
280
|
+
return this._push((e) => e.toBeWithinRange(min, max));
|
|
281
|
+
}
|
|
282
|
+
/* ------------------------------------------------------------------------ */
|
|
283
|
+
/**
|
|
284
|
+
* Expects the value _**NOT**_ to be _deep equal to_ the specified expected
|
|
285
|
+
* one.
|
|
286
|
+
*
|
|
287
|
+
* Negates: {@link Matchers.toEqual `toEqual(...)`}
|
|
288
|
+
*/
|
|
289
|
+
toEqual(expected) {
|
|
290
|
+
return this._push((e) => e.toEqual(expected));
|
|
291
|
+
}
|
|
292
|
+
/* ------------------------------------------------------------------------ */
|
|
293
|
+
/**
|
|
294
|
+
* Expects the value to have a `number` _property_ `length` _different_ from
|
|
295
|
+
* the specified expected value.
|
|
296
|
+
*
|
|
297
|
+
* Negates: {@link Matchers.toHaveLength `toHaveLength(...)`}
|
|
298
|
+
*/
|
|
299
|
+
toHaveLength(length) {
|
|
300
|
+
return this._push((e) => e.toHaveLength(length));
|
|
301
|
+
}
|
|
302
|
+
/* ------------------------------------------------------------------------ */
|
|
303
|
+
/**
|
|
304
|
+
* Expects the value _**NOT**_ to have the specified _property_.
|
|
305
|
+
*
|
|
306
|
+
* Negates: {@link Matchers.toHaveProperty `toHaveProperty(...)`}
|
|
307
|
+
*/
|
|
308
|
+
toHaveProperty(property) {
|
|
309
|
+
return this._push((e) => e.toHaveProperty(property));
|
|
310
|
+
}
|
|
311
|
+
/* ------------------------------------------------------------------------ */
|
|
312
|
+
/**
|
|
313
|
+
* Expects the value to have a `number` _property_ `size` _different_ from
|
|
314
|
+
* the specified expected value.
|
|
315
|
+
*
|
|
316
|
+
* Negates: {@link Matchers.toHaveSize `toHaveSize(...)`}
|
|
317
|
+
*/
|
|
318
|
+
toHaveSize(size) {
|
|
319
|
+
return this._push((e) => e.toHaveSize(size));
|
|
320
|
+
}
|
|
321
|
+
toInclude(contents) {
|
|
322
|
+
return this._push((e) => e.toInclude(contents));
|
|
323
|
+
}
|
|
324
|
+
/* ------------------------------------------------------------------------ */
|
|
325
|
+
/**
|
|
326
|
+
* Expects the value to be a `string` _**NOT MATCHING**_ the specified
|
|
327
|
+
* sub-`string` or {@link RegExp}.
|
|
328
|
+
*
|
|
329
|
+
* Negates: {@link Matchers.toMatch `toMatch(...)`}
|
|
330
|
+
*/
|
|
331
|
+
toMatch(matcher) {
|
|
332
|
+
return this._push((e) => e.toMatch(matcher));
|
|
333
|
+
}
|
|
334
|
+
/* ------------------------------------------------------------------------ */
|
|
335
|
+
/**
|
|
336
|
+
* Expects the value _**NOT**_ to be _strictly equal to_ the specified
|
|
337
|
+
* expected one.
|
|
338
|
+
*
|
|
339
|
+
* Negates: {@link Matchers.toStrictlyEqual `toStrictlyEqual(...)`}
|
|
340
|
+
*/
|
|
341
|
+
toStrictlyEqual(expected) {
|
|
342
|
+
return this._push((e) => e.toStrictlyEqual(expected));
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
346
|
+
0 && (module.exports = {
|
|
347
|
+
Matchers,
|
|
348
|
+
NegativeMatchers
|
|
349
|
+
});
|
|
350
|
+
//# sourceMappingURL=matchers.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/expectation/matchers.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMO;AACP,mBAKO;AASA,IAAM,WAAN,MAA4B;AAAA,EAChB;AAAA,EACR;AAAA,EAET,cAAc;AACZ,UAAM,WAAsB,CAAC;AAC7B,SAAK,MAAM,IAAI,iBAAiB,MAAM,QAAQ;AAC9C,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA,OAAO,OAAmB;AACxB,QAAI,eAAe,IAAI,iCAAa,OAAO,MAAS;AACpD,eAAW,WAAW,KAAK,WAAW;AACpC,qBAAe,QAAQ,YAAY;AAAA,IACrC;AACA,WAAO,aAAa;AAAA,EACtB;AAAA,EAEQ,MAAM,SAAiC;AAC7C,UAAM,WAAW,IAAI,SAAS;AAC9B,aAAS,UAAU,KAAK,GAAG,KAAK,WAAW,OAAO;AAClD,WAAO;AAAA,EACT;AAAA,EAEA,OAAO;AACL,IAAC,KAAK,UAAkB,0BAAa,IAAI;AAAA,EAC3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAKI,MACA,WACsC;AACxC,WAAO,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,MAAM,SAA8B,CAAC;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA0BA,YACI,OACA,OACQ;AACV,WAAO,KAAK,MAAM,CAAC,MAAM,EAAE,YAAY,OAAiB,KAAe,CAAC;AAAA,EAC1E;AAAA;AAAA;AAAA;A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