@mojaloop/sdk-scheme-adapter 13.0.0 → 13.0.3
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 +21 -0
- package/package.json +3 -3
- package/src/OutboundServer/api.yaml +51 -29
- package/src/OutboundServer/api_interfaces/openapi.d.ts +22 -13
- package/src/OutboundServer/api_template/components/schemas/partiesByIdResponse.yaml +10 -3
- package/src/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +42 -34
- package/src/OutboundServer/api_template/components/schemas/simpleTransfersPostResponse.yaml +9 -2
- package/src/lib/model/PartiesModel.js +17 -1
- package/test/integration/lib/Outbound/parties.test.js +3 -1
- package/test/integration/lib/Outbound/quotes.test.js +2 -0
- package/test/integration/lib/Outbound/simpleTransfers.test.js +2 -0
- package/test/unit/api/transfers/utils.js +1 -1
- package/test/unit/lib/model/PartiesModel.test.js +16 -7
- package/test/unit/lib/model/QuotesModel.test.js +8 -2
- package/test/unit/lib/model/TransfersModel.test.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
# Changelog: [mojaloop/thirdparty-api-svc](https://github.com/mojaloop/thirdparty-api-svc)
|
|
2
|
+
### [13.0.3](https://github.com/mojaloop/sdk-scheme-adapter/compare/v13.0.2...v13.0.3) (2022-05-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* correct party outbound response ([#317](https://github.com/mojaloop/sdk-scheme-adapter/issues/317)) ([752e8b4](https://github.com/mojaloop/sdk-scheme-adapter/commit/752e8b4d315a6e9c3b8ad4ff1b65761c41e3d721))
|
|
8
|
+
|
|
9
|
+
### [13.0.2](https://github.com/mojaloop/sdk-scheme-adapter/compare/v13.0.1...v13.0.2) (2022-05-12)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* update outbound interface and response oa3 defs ([#316](https://github.com/mojaloop/sdk-scheme-adapter/issues/316)) ([50d23d8](https://github.com/mojaloop/sdk-scheme-adapter/commit/50d23d8562afdeeeef2203d6196473c7b0e484a5))
|
|
15
|
+
|
|
16
|
+
### [13.0.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v13.0.0...v13.0.1) (2022-05-11)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* update package.json with main and type correct path ([#315](https://github.com/mojaloop/sdk-scheme-adapter/issues/315)) ([6d0f9b5](https://github.com/mojaloop/sdk-scheme-adapter/commit/6d0f9b541f79fa50cb6c89a3ac47cf97155f60ae))
|
|
22
|
+
|
|
2
23
|
## [13.0.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v12.3.0...v13.0.0) (2022-05-10)
|
|
3
24
|
|
|
4
25
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.3",
|
|
4
4
|
"description": "An adapter for connecting to Mojaloop API enabled switches.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"types": "src/index.d.ts",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "=16.x"
|
|
9
9
|
},
|
|
@@ -2124,8 +2124,15 @@ components:
|
|
|
2124
2124
|
description: 'GET /parties/{Type}/{ID} response object'
|
|
2125
2125
|
properties:
|
|
2126
2126
|
party:
|
|
2127
|
-
|
|
2128
|
-
|
|
2127
|
+
properties:
|
|
2128
|
+
body:
|
|
2129
|
+
$ref: '#/components/schemas/Party'
|
|
2130
|
+
description: Information regarding the requested Party.
|
|
2131
|
+
headers:
|
|
2132
|
+
type: object
|
|
2133
|
+
required:
|
|
2134
|
+
- body
|
|
2135
|
+
- headers
|
|
2129
2136
|
currentState:
|
|
2130
2137
|
$ref: '#/components/schemas/async2SyncCurrentState'
|
|
2131
2138
|
required:
|
|
@@ -2235,33 +2242,41 @@ components:
|
|
|
2235
2242
|
type: object
|
|
2236
2243
|
description: 'The object sent in the PUT /quotes/{ID} callback.'
|
|
2237
2244
|
properties:
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2245
|
+
body:
|
|
2246
|
+
type: object
|
|
2247
|
+
properties:
|
|
2248
|
+
transferAmount:
|
|
2249
|
+
$ref: '#/components/schemas/Money'
|
|
2250
|
+
payeeReceiveAmount:
|
|
2251
|
+
$ref: '#/components/schemas/Money'
|
|
2252
|
+
payeeFspFee:
|
|
2253
|
+
$ref: '#/components/schemas/Money'
|
|
2254
|
+
payeeFspCommission:
|
|
2255
|
+
$ref: '#/components/schemas/Money'
|
|
2256
|
+
expiration:
|
|
2257
|
+
type: string
|
|
2258
|
+
description: >-
|
|
2259
|
+
Date and time until when the quotation is valid and can be
|
|
2260
|
+
honored when used in the subsequent transaction.
|
|
2261
|
+
example: '2016-05-24T08:38:08.699-04:00'
|
|
2262
|
+
geoCode:
|
|
2263
|
+
$ref: '#/components/schemas/GeoCode'
|
|
2264
|
+
ilpPacket:
|
|
2265
|
+
$ref: '#/components/schemas/IlpPacket'
|
|
2266
|
+
condition:
|
|
2267
|
+
$ref: '#/components/schemas/IlpCondition'
|
|
2268
|
+
extensionList:
|
|
2269
|
+
$ref: '#/components/schemas/ExtensionList'
|
|
2270
|
+
required:
|
|
2271
|
+
- transferAmount
|
|
2272
|
+
- expiration
|
|
2273
|
+
- ilpPacket
|
|
2274
|
+
- condition
|
|
2275
|
+
headers:
|
|
2276
|
+
type: object
|
|
2260
2277
|
required:
|
|
2261
|
-
-
|
|
2262
|
-
-
|
|
2263
|
-
- ilpPacket
|
|
2264
|
-
- condition
|
|
2278
|
+
- body
|
|
2279
|
+
- headers
|
|
2265
2280
|
currentState:
|
|
2266
2281
|
$ref: '#/components/schemas/async2SyncCurrentState'
|
|
2267
2282
|
required:
|
|
@@ -2316,7 +2331,14 @@ components:
|
|
|
2316
2331
|
type: object
|
|
2317
2332
|
properties:
|
|
2318
2333
|
transfer:
|
|
2319
|
-
|
|
2334
|
+
properties:
|
|
2335
|
+
body:
|
|
2336
|
+
$ref: '#/components/schemas/TransfersIDPutResponse'
|
|
2337
|
+
headers:
|
|
2338
|
+
type: object
|
|
2339
|
+
required:
|
|
2340
|
+
- body
|
|
2341
|
+
- headers
|
|
2320
2342
|
currentState:
|
|
2321
2343
|
$ref: '#/components/schemas/async2SyncCurrentState'
|
|
2322
2344
|
required:
|
|
@@ -1070,8 +1070,11 @@ export interface components {
|
|
|
1070
1070
|
| "ERROR_OCCURRED";
|
|
1071
1071
|
/** GET /parties/{Type}/{ID} response object */
|
|
1072
1072
|
partiesByIdResponse: {
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
party: {
|
|
1074
|
+
/** Information regarding the requested Party. */
|
|
1075
|
+
body: components["schemas"]["Party"];
|
|
1076
|
+
headers: { [key: string]: unknown };
|
|
1077
|
+
};
|
|
1075
1078
|
currentState: components["schemas"]["async2SyncCurrentState"];
|
|
1076
1079
|
};
|
|
1077
1080
|
/** The object sent in the POST /quotes request. */
|
|
@@ -1110,16 +1113,19 @@ export interface components {
|
|
|
1110
1113
|
quotesPostResponse: {
|
|
1111
1114
|
/** The object sent in the PUT /quotes/{ID} callback. */
|
|
1112
1115
|
quotes: {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1116
|
+
body: {
|
|
1117
|
+
transferAmount: components["schemas"]["Money"];
|
|
1118
|
+
payeeReceiveAmount?: components["schemas"]["Money"];
|
|
1119
|
+
payeeFspFee?: components["schemas"]["Money"];
|
|
1120
|
+
payeeFspCommission?: components["schemas"]["Money"];
|
|
1121
|
+
/** Date and time until when the quotation is valid and can be honored when used in the subsequent transaction. */
|
|
1122
|
+
expiration: string;
|
|
1123
|
+
geoCode?: components["schemas"]["GeoCode"];
|
|
1124
|
+
ilpPacket: components["schemas"]["IlpPacket"];
|
|
1125
|
+
condition: components["schemas"]["IlpCondition"];
|
|
1126
|
+
extensionList?: components["schemas"]["ExtensionList"];
|
|
1127
|
+
};
|
|
1128
|
+
headers: { [key: string]: unknown };
|
|
1123
1129
|
};
|
|
1124
1130
|
currentState: components["schemas"]["async2SyncCurrentState"];
|
|
1125
1131
|
};
|
|
@@ -1142,7 +1148,10 @@ export interface components {
|
|
|
1142
1148
|
transfersPostRequest: components["schemas"]["TransfersPostRequest"];
|
|
1143
1149
|
};
|
|
1144
1150
|
simpleTransfersPostResponse: {
|
|
1145
|
-
transfer:
|
|
1151
|
+
transfer: {
|
|
1152
|
+
body: components["schemas"]["TransfersIDPutResponse"];
|
|
1153
|
+
headers: { [key: string]: unknown };
|
|
1154
|
+
};
|
|
1146
1155
|
currentState: components["schemas"]["async2SyncCurrentState"];
|
|
1147
1156
|
};
|
|
1148
1157
|
errorSimpleTransfersResponse: components["schemas"]["errorResponse"] & {
|
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
description: 'GET /parties/{Type}/{ID} response object'
|
|
4
4
|
properties:
|
|
5
5
|
party:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
properties:
|
|
7
|
+
body:
|
|
8
|
+
$ref: >-
|
|
9
|
+
../../../../../node_modules/@mojaloop/api-snippets/thirdparty/v1_0/openapi3/components/schemas/Party.yaml
|
|
10
|
+
description: Information regarding the requested Party.
|
|
11
|
+
headers:
|
|
12
|
+
type: object
|
|
13
|
+
required:
|
|
14
|
+
- body
|
|
15
|
+
- headers
|
|
9
16
|
currentState:
|
|
10
17
|
$ref: ../schemas/async2SyncCurrentState.yaml
|
|
11
18
|
required:
|
|
@@ -6,41 +6,49 @@ properties:
|
|
|
6
6
|
type: object
|
|
7
7
|
description: 'The object sent in the PUT /quotes/{ID} callback.'
|
|
8
8
|
properties:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
body:
|
|
10
|
+
type: object
|
|
11
|
+
properties:
|
|
12
|
+
transferAmount:
|
|
13
|
+
$ref: >-
|
|
14
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Money.yaml
|
|
15
|
+
payeeReceiveAmount:
|
|
16
|
+
$ref: >-
|
|
17
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Money.yaml
|
|
18
|
+
payeeFspFee:
|
|
19
|
+
$ref: >-
|
|
20
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Money.yaml
|
|
21
|
+
payeeFspCommission:
|
|
22
|
+
$ref: >-
|
|
23
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Money.yaml
|
|
24
|
+
expiration:
|
|
25
|
+
type: string
|
|
26
|
+
description: >-
|
|
27
|
+
Date and time until when the quotation is valid and can be honored when
|
|
28
|
+
used in the subsequent transaction.
|
|
29
|
+
example: '2016-05-24T08:38:08.699-04:00'
|
|
30
|
+
geoCode:
|
|
31
|
+
$ref: >-
|
|
32
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/GeoCode.yaml
|
|
33
|
+
ilpPacket:
|
|
34
|
+
$ref: >-
|
|
35
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/IlpPacket.yaml
|
|
36
|
+
condition:
|
|
37
|
+
$ref: >-
|
|
38
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/IlpCondition.yaml
|
|
39
|
+
extensionList:
|
|
40
|
+
$ref: >-
|
|
41
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/ExtensionList.yaml
|
|
42
|
+
required:
|
|
43
|
+
- transferAmount
|
|
44
|
+
- expiration
|
|
45
|
+
- ilpPacket
|
|
46
|
+
- condition
|
|
47
|
+
headers:
|
|
48
|
+
type: object
|
|
39
49
|
required:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- ilpPacket
|
|
43
|
-
- condition
|
|
50
|
+
- body
|
|
51
|
+
- headers
|
|
44
52
|
currentState:
|
|
45
53
|
$ref: ../schemas/async2SyncCurrentState.yaml
|
|
46
54
|
required:
|
|
@@ -2,8 +2,15 @@ title: SimpleTransfersPostResponse
|
|
|
2
2
|
type: object
|
|
3
3
|
properties:
|
|
4
4
|
transfer:
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
properties:
|
|
6
|
+
body:
|
|
7
|
+
$ref: >-
|
|
8
|
+
../../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransfersIDPutResponse.yaml
|
|
9
|
+
headers:
|
|
10
|
+
type: object
|
|
11
|
+
required:
|
|
12
|
+
- body
|
|
13
|
+
- headers
|
|
7
14
|
currentState:
|
|
8
15
|
$ref: ../schemas/async2SyncCurrentState.yaml
|
|
9
16
|
required:
|
|
@@ -58,12 +58,28 @@ function argsValidation({ type, id, subId }) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* @name reformatMessage
|
|
63
|
+
* @description reformats message received from PUB/SUB channel, it is optional method, if not specified identify function is used by default
|
|
64
|
+
* @param {object} message - message received
|
|
65
|
+
* @returns {object} - reformatted message
|
|
66
|
+
*/
|
|
67
|
+
function reformatMessage(message) {
|
|
68
|
+
return {
|
|
69
|
+
party: {
|
|
70
|
+
body: { ...message.body.party },
|
|
71
|
+
headers: { ...message.headers }
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
// generate model
|
|
62
77
|
const PartiesModel = Async2SyncModel.generate({
|
|
63
78
|
modelName: 'PartiesModel',
|
|
64
79
|
channelNameMethod: channelName,
|
|
65
80
|
requestActionMethod: requestAction,
|
|
66
|
-
argsValidationMethod: argsValidation
|
|
81
|
+
argsValidationMethod: argsValidation,
|
|
82
|
+
reformatMessageMethod: reformatMessage
|
|
67
83
|
});
|
|
68
84
|
|
|
69
85
|
module.exports = PartiesModel;
|
|
@@ -13,7 +13,9 @@ describe('/parties', () => {
|
|
|
13
13
|
|
|
14
14
|
expect(res.status).toEqual(200);
|
|
15
15
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
16
|
-
expect(typeof res.data.
|
|
16
|
+
expect(typeof res.data.party).toEqual('object');
|
|
17
|
+
expect(typeof res.data.party.body).toEqual('object');
|
|
18
|
+
expect(typeof res.data.party.headers).toEqual('object');
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
test('get - timeout', (done) => {
|
|
@@ -30,6 +30,8 @@ describe('/quotes', () => {
|
|
|
30
30
|
expect(res.status).toEqual(200);
|
|
31
31
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
32
32
|
expect(typeof res.data.quotes).toEqual('object');
|
|
33
|
+
expect(typeof res.data.quotes.body).toEqual('object');
|
|
34
|
+
expect(typeof res.data.quotes.headers).toEqual('object');
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
test('post - timeout', (done) => {
|
|
@@ -39,6 +39,8 @@ describe('/simpleTransfers', () => {
|
|
|
39
39
|
expect(res.status).toEqual(200);
|
|
40
40
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
41
41
|
expect(typeof res.data.transfer).toEqual('object');
|
|
42
|
+
expect(typeof res.data.transfer.body).toEqual('object');
|
|
43
|
+
expect(typeof res.data.transfer.headers).toEqual('object');
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
test('post - timeout', async () => {
|
|
@@ -202,7 +202,7 @@ function createPostTransfersTester(
|
|
|
202
202
|
|
|
203
203
|
const res = await reqOutbound.post('/transfers').send(postTransfersSimpleBody);
|
|
204
204
|
const {body} = res;
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
expect(res.statusCode).toEqual(responseCode);
|
|
207
207
|
|
|
208
208
|
// remove elements of the response we do not want/need to compare for correctness.
|
|
@@ -155,9 +155,12 @@ describe('PartiesModel', () => {
|
|
|
155
155
|
model.run = jest.fn(() => Promise.resolve());
|
|
156
156
|
|
|
157
157
|
const message = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
body: {
|
|
159
|
+
party: {
|
|
160
|
+
Iam: 'the-body'
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
headers: {}
|
|
161
164
|
};
|
|
162
165
|
|
|
163
166
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
@@ -175,7 +178,10 @@ describe('PartiesModel', () => {
|
|
|
175
178
|
|
|
176
179
|
// check that this.context.data is updated
|
|
177
180
|
expect(model.context.data).toEqual({
|
|
178
|
-
|
|
181
|
+
party: {
|
|
182
|
+
body: { ...message.body.party },
|
|
183
|
+
headers: { ...message.headers }
|
|
184
|
+
},
|
|
179
185
|
// current state will be updated by onAfterTransition which isn't called
|
|
180
186
|
// when manual invocation of transition handler happens
|
|
181
187
|
currentState: 'start'
|
|
@@ -216,9 +222,12 @@ describe('PartiesModel', () => {
|
|
|
216
222
|
model.run = jest.fn(() => Promise.resolve());
|
|
217
223
|
|
|
218
224
|
const message = {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
225
|
+
body: {
|
|
226
|
+
party: {
|
|
227
|
+
Iam: 'the-body'
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
headers: {}
|
|
222
231
|
};
|
|
223
232
|
|
|
224
233
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
@@ -142,7 +142,10 @@ describe('QuotesModel', () => {
|
|
|
142
142
|
// mock workflow execution which is tested in separate case
|
|
143
143
|
model.run = jest.fn(() => Promise.resolve());
|
|
144
144
|
|
|
145
|
-
const message = {
|
|
145
|
+
const message = {
|
|
146
|
+
body: { ...putQuotesResponse },
|
|
147
|
+
headers: {}
|
|
148
|
+
};
|
|
146
149
|
|
|
147
150
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
148
151
|
// manually invoke transition handler
|
|
@@ -200,7 +203,10 @@ describe('QuotesModel', () => {
|
|
|
200
203
|
// mock workflow execution which is tested in separate case
|
|
201
204
|
model.run = jest.fn(() => Promise.resolve());
|
|
202
205
|
|
|
203
|
-
const message = {
|
|
206
|
+
const message = {
|
|
207
|
+
body: { ...putQuotesResponse },
|
|
208
|
+
headers: {}
|
|
209
|
+
};
|
|
204
210
|
|
|
205
211
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
206
212
|
// manually invoke transition handler
|
|
@@ -142,7 +142,10 @@ describe('TransfersModel', () => {
|
|
|
142
142
|
// mock workflow execution which is tested in separate case
|
|
143
143
|
model.run = jest.fn(() => Promise.resolve());
|
|
144
144
|
|
|
145
|
-
const message = {
|
|
145
|
+
const message = {
|
|
146
|
+
body: { ...putTransfersResponse },
|
|
147
|
+
headers: {}
|
|
148
|
+
};
|
|
146
149
|
|
|
147
150
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
148
151
|
// manually invoke transition handler
|
|
@@ -200,7 +203,10 @@ describe('TransfersModel', () => {
|
|
|
200
203
|
// mock workflow execution which is tested in separate case
|
|
201
204
|
model.run = jest.fn(() => Promise.resolve());
|
|
202
205
|
|
|
203
|
-
const message = {
|
|
206
|
+
const message = {
|
|
207
|
+
body: { ...putTransfersResponse },
|
|
208
|
+
headers: {}
|
|
209
|
+
};
|
|
204
210
|
|
|
205
211
|
const onRequestActionPromise = new Promise((resolve, reject) => {
|
|
206
212
|
// manually invoke transition handler
|