@jaypie/testkit 1.0.27 → 1.0.28
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/README.md
CHANGED
|
@@ -146,13 +146,16 @@ export default {
|
|
|
146
146
|
toMatchUuid4,
|
|
147
147
|
toMatchUuid5,
|
|
148
148
|
toMatchUuid,
|
|
149
|
+
toThrowBadGatewayError,
|
|
149
150
|
toThrowBadRequestError,
|
|
150
151
|
toThrowConfigurationError,
|
|
151
152
|
toThrowForbiddenError,
|
|
153
|
+
toThrowGatewayTimeoutError,
|
|
152
154
|
toThrowInternalError,
|
|
153
155
|
toThrowJaypieError,
|
|
154
156
|
toThrowNotFoundError,
|
|
155
157
|
toThrowUnauthorizedError,
|
|
158
|
+
toThrowUnavailableError,
|
|
156
159
|
};
|
|
157
160
|
```
|
|
158
161
|
|
|
@@ -330,6 +333,7 @@ const event = sqsTestRecords(
|
|
|
330
333
|
|
|
331
334
|
| Date | Version | Summary |
|
|
332
335
|
| ---------- | ------- | -------------- |
|
|
336
|
+
| 9/14/2024 | 1.0.28 | Matchers `toThrowBadGatewayError`, `toThrowGatewayTimeoutError`, `toThrowUnavailableError` |
|
|
333
337
|
| 9/13/2024 | 1.0.27 | Matcher `toBeCalledAboveTrace` |
|
|
334
338
|
| 7/16/2024 | 1.0.21 | Export Jaypie mock as default |
|
|
335
339
|
| 3/20/2024 | 1.0.2 | Export `LOG` |
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BadGatewayError,
|
|
2
3
|
BadRequestError,
|
|
3
4
|
ConfigurationError,
|
|
4
5
|
ForbiddenError,
|
|
6
|
+
GatewayTimeoutError,
|
|
5
7
|
InternalError,
|
|
6
8
|
isJaypieError,
|
|
7
9
|
NotFoundError,
|
|
8
10
|
UnauthorizedError,
|
|
11
|
+
UnavailableError,
|
|
9
12
|
} from "@jaypie/core";
|
|
10
13
|
|
|
11
14
|
//
|
|
@@ -69,18 +72,24 @@ const toThrowJaypieError = async (received, expected) => {
|
|
|
69
72
|
// Convenience Methods
|
|
70
73
|
//
|
|
71
74
|
|
|
75
|
+
const toThrowBadGatewayError = (received) =>
|
|
76
|
+
toThrowJaypieError(received, BadGatewayError);
|
|
72
77
|
const toThrowBadRequestError = (received) =>
|
|
73
78
|
toThrowJaypieError(received, BadRequestError);
|
|
74
79
|
const toThrowConfigurationError = (received) =>
|
|
75
80
|
toThrowJaypieError(received, ConfigurationError);
|
|
76
81
|
const toThrowForbiddenError = (received) =>
|
|
77
82
|
toThrowJaypieError(received, ForbiddenError);
|
|
83
|
+
const toThrowGatewayTimeoutError = (received) =>
|
|
84
|
+
toThrowJaypieError(received, GatewayTimeoutError);
|
|
78
85
|
const toThrowInternalError = (received) =>
|
|
79
86
|
toThrowJaypieError(received, InternalError);
|
|
80
87
|
const toThrowNotFoundError = (received) =>
|
|
81
88
|
toThrowJaypieError(received, NotFoundError);
|
|
82
89
|
const toThrowUnauthorizedError = (received) =>
|
|
83
90
|
toThrowJaypieError(received, UnauthorizedError);
|
|
91
|
+
const toThrowUnavailableError = (received) =>
|
|
92
|
+
toThrowJaypieError(received, UnavailableError);
|
|
84
93
|
|
|
85
94
|
//
|
|
86
95
|
//
|
|
@@ -90,10 +99,13 @@ const toThrowUnauthorizedError = (received) =>
|
|
|
90
99
|
export default toThrowJaypieError;
|
|
91
100
|
|
|
92
101
|
export {
|
|
102
|
+
toThrowBadGatewayError,
|
|
93
103
|
toThrowBadRequestError,
|
|
94
104
|
toThrowConfigurationError,
|
|
95
105
|
toThrowForbiddenError,
|
|
106
|
+
toThrowGatewayTimeoutError,
|
|
96
107
|
toThrowInternalError,
|
|
97
108
|
toThrowNotFoundError,
|
|
98
109
|
toThrowUnauthorizedError,
|
|
110
|
+
toThrowUnavailableError,
|
|
99
111
|
};
|
package/src/matchers.module.js
CHANGED
|
@@ -5,12 +5,15 @@ import toBeCalledWithInitialParams from "./matchers/toBeCalledWithInitialParams.
|
|
|
5
5
|
import toBeClass from "./matchers/toBeClass.matcher.js";
|
|
6
6
|
import toBeJaypieError from "./matchers/toBeJaypieError.matcher.js";
|
|
7
7
|
import toThrowJaypieError, {
|
|
8
|
+
toThrowBadGatewayError,
|
|
8
9
|
toThrowBadRequestError,
|
|
9
10
|
toThrowConfigurationError,
|
|
10
11
|
toThrowForbiddenError,
|
|
12
|
+
toThrowGatewayTimeoutError,
|
|
11
13
|
toThrowInternalError,
|
|
12
14
|
toThrowNotFoundError,
|
|
13
15
|
toThrowUnauthorizedError,
|
|
16
|
+
toThrowUnavailableError,
|
|
14
17
|
} from "./matchers/toThrowJaypieError.matcher.js";
|
|
15
18
|
|
|
16
19
|
import {
|
|
@@ -42,11 +45,14 @@ export default {
|
|
|
42
45
|
toMatchUuid4,
|
|
43
46
|
toMatchUuid5,
|
|
44
47
|
toMatchUuid,
|
|
48
|
+
toThrowBadGatewayError,
|
|
45
49
|
toThrowBadRequestError,
|
|
46
50
|
toThrowConfigurationError,
|
|
47
51
|
toThrowForbiddenError,
|
|
52
|
+
toThrowGatewayTimeoutError,
|
|
48
53
|
toThrowInternalError,
|
|
49
54
|
toThrowJaypieError,
|
|
50
55
|
toThrowNotFoundError,
|
|
51
56
|
toThrowUnauthorizedError,
|
|
57
|
+
toThrowUnavailableError,
|
|
52
58
|
};
|