Skip to content

Commit ee9c83d

Browse files
author
ehennum
committed
adjust internal library unit test to latest version of library
1 parent 3164c3e commit ee9c83d

File tree

1 file changed

+58
-13
lines changed

1 file changed

+58
-13
lines changed

test-basic/endpoint-proxy.js

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,58 +48,101 @@ describe('call an endpoint proxy', function(){
4848
"name": "input",
4949
"datatype": "jsonDocument",
5050
"multiple": true,
51-
"nullable": true
51+
"nullable": true,
52+
"dataKind": "node",
53+
"mimeType": "application/json"
5254
} ],
5355
"return": {
5456
"datatype": "jsonDocument",
5557
"multiple": true,
56-
"nullable": true
57-
}
58+
"nullable": true,
59+
"dataKind": "node",
60+
"mimeType": "application/json"
61+
},
62+
"maxArgs": 1,
63+
"paramsKind": "multiNode",
64+
"sessionParam": null,
65+
"returnKind": "multipart",
66+
"$jsOutputMode": "promise"
5867
};
5968
const multiAtomicInputMultiOutputDecl = {
6069
"functionName": "multiAtomicInputMultiOutput",
6170
"params": [ {
6271
"name": "input",
6372
"datatype": "string",
6473
"multiple": true,
65-
"nullable": true
74+
"nullable": true,
75+
"dataKind": "atomic",
76+
"mimeType": "text/plain"
6677
} ],
6778
"return": {
6879
"datatype": "string",
6980
"multiple": true,
70-
"nullable": true
71-
}
81+
"nullable": true,
82+
"dataKind": "atomic",
83+
"mimeType": "text/plain",
84+
"$jsType": "string"
85+
},
86+
"maxArgs": 1,
87+
"paramsKind": "multiAtomic",
88+
"sessionParam": null,
89+
"returnKind": "multipart",
90+
"$jsOutputMode": "promise"
7291
};
7392
const singleNodeInputSingleOutputDecl = {
7493
"functionName": "singleNodeInputSingleOutput",
7594
"params": [ {
7695
"name": "input",
7796
"datatype": "jsonDocument",
7897
"multiple": false,
79-
"nullable": true
98+
"nullable": true,
99+
"dataKind": "node",
100+
"mimeType": "application/json"
80101
} ],
81102
"return": {
82103
"datatype": "jsonDocument",
83104
"multiple": false,
84-
"nullable": true
85-
}
105+
"nullable": true,
106+
"dataKind": "node",
107+
"mimeType": "application/json"
108+
},
109+
"maxArgs": 1,
110+
"paramsKind": "multiNode",
111+
"sessionParam": null,
112+
"returnKind": "single",
113+
"$jsOutputMode": "promise"
86114
};
87115
const singleAtomicInputSingleOutputDecl = {
88116
"functionName": "singleAtomicInputSingleOutput",
89117
"params": [ {
90118
"name": "input",
91119
"datatype": "int",
92120
"multiple": false,
93-
"nullable": true
121+
"nullable": true,
122+
"dataKind": "atomic",
123+
"mimeType": "text/plain"
94124
} ],
95125
"return": {
96126
"datatype": "int",
97127
"multiple": false,
98-
"nullable": true
99-
}
128+
"nullable": true,
129+
"dataKind": "atomic",
130+
"mimeType": "text/plain",
131+
"$jsType": "number"
132+
},
133+
"maxArgs": 1,
134+
"paramsKind": "multiAtomic",
135+
"sessionParam": null,
136+
"returnKind": "single",
137+
"$jsOutputMode": "promise"
100138
};
101139
const emptyInputEmptyOutputDecl = {
102-
"functionName": "emptyAtomicInputEmptyOutput"
140+
"functionName": "emptyAtomicInputEmptyOutput",
141+
"maxArgs": 0,
142+
"paramsKind": "empty",
143+
"sessionParam": null,
144+
"returnKind": "empty",
145+
"$jsOutputMode": "promise"
103146
};
104147
const multiNodeInputMultiOutputAPIUri = serviceDecl.endpointDirectory+multiNodeInputMultiOutputDecl.functionName+'.api';
105148
const multiAtomicInputMultiOutputAPIUri = serviceDecl.endpointDirectory+multiAtomicInputMultiOutputDecl.functionName+'.api';
@@ -293,6 +336,8 @@ void 0;`;
293336
.catch(done);
294337
});
295338
it('for empty in SJS', function(done){
339+
emptyInputEmptyOutputDecl.params = null;
340+
emptyInputEmptyOutputDecl.return = null;
296341
const proxyCaller = proxy
297342
.init(db, serviceDecl)
298343
.withFunction(emptyInputEmptyOutputDecl, '.sjs');

0 commit comments

Comments
 (0)