THRIFT-3122 Javascript struct constructor should properly initialize struct and container members from plain js arguments
Client: Node and JS
Patch: Igor Tkach

    This closes #476
diff --git a/lib/js/Gruntfile.js b/lib/js/Gruntfile.js
index 3298d5c..32c8834 100644
--- a/lib/js/Gruntfile.js
+++ b/lib/js/Gruntfile.js
@@ -35,7 +35,7 @@
           'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
         }
       }
-    },  
+    },
     shell: {
       InstallThriftJS: {
         command: 'mkdir test/build; mkdir test/build/js; cp src/thrift.js test/build/js/thrift.js'
@@ -48,6 +48,9 @@
       },
       ThriftGenJQ: {
         command: 'thrift -gen js:jquery -gen js:node -o test ../../test/ThriftTest.thrift'
+      },
+      ThriftGenDeepConstructor: {
+        command: 'thrift -gen js -o test ../../test/JsDeepConstructorTest.thrift'
       }
     },
     external_daemon: {
@@ -123,6 +126,13 @@
             'https://localhost:8089/testws.html'
           ]
         }
+      },
+      ThriftDeepConstructor: {
+        options: {
+          urls: [
+            'http://localhost:8088/test-deep-constructor.html'
+          ]
+        }
       }
     },
     jshint: {
@@ -147,13 +157,14 @@
   grunt.loadNpmTasks('grunt-external-daemon');
   grunt.loadNpmTasks('grunt-shell');
 
-  grunt.registerTask('test', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen', 
-                              'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS', 
+  grunt.registerTask('test', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
+                              'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS',
+                              'shell:ThriftGenDeepConstructor', 'qunit:ThriftDeepConstructor',
                               'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
                               'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS'
                              ]);
-  grunt.registerTask('default', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen', 
-                                 'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS', 
+  grunt.registerTask('default', ['jshint', 'shell:InstallThriftJS', 'shell:InstallThriftNodeJSDep', 'shell:ThriftGen',
+                                 'external_daemon:ThriftTestServer', 'external_daemon:ThriftTestServer_TLS',
                                  'qunit:ThriftJS', 'qunit:ThriftJS_TLS',
                                  'shell:ThriftGenJQ', 'qunit:ThriftJSJQ', 'qunit:ThriftJSJQ_TLS',
                                  'concat', 'uglify', 'jsdoc'