THRIFT-3122 Javascript struct constructor should properly initialize struct and container members from plain js arguments
Patch: Igor Tkach
This closes #519
diff --git a/lib/nodejs/test/test_driver.js b/lib/nodejs/test/test_driver.js
index 6e472ad..27ffd63 100644
--- a/lib/nodejs/test/test_driver.js
+++ b/lib/nodejs/test/test_driver.js
@@ -80,6 +80,11 @@
checkRecursively(testCases.insanity, response, 'testInsanity');
});
+ client.testInsanity(testCases.crazy2, function(err, response) {
+ assert.error(err, 'testInsanity2: no callback error');
+ checkRecursively(testCases.insanity, response, 'testInsanity2');
+ });
+
client.testException('TException', function(err, response) {
assert.ok(err instanceof TException, 'testException: correct error type');
assert.ok(!response, 'testException: no response');
@@ -161,6 +166,12 @@
})
.fail(fail('testInsanity'));
+ client.testInsanity(testCases.crazy2)
+ .then(function(response) {
+ checkRecursively(testCases.insanity, response, 'testInsanity2');
+ })
+ .fail(fail('testInsanity2'));
+
client.testException('TException')
.then(function(response) {
fail('testException: TException');