THRIFT-4675: Fix int64 constants generation for map keys
diff --git a/lib/js/package.json b/lib/js/package.json
index c4bcc6d..a35ac15 100644
--- a/lib/js/package.json
+++ b/lib/js/package.json
@@ -16,7 +16,7 @@
   },
   "dependencies": {
     "jsdoc": "^3.5.5",
-    "json-int64": "^0.0.3",
+    "json-int64": "^1.0.0",
     "nopt": "^4.0.1"
   }
 }
diff --git a/lib/js/test/test-int64.html b/lib/js/test/test-int64.html
index 620e6ff..bcb05fb 100644
--- a/lib/js/test/test-int64.html
+++ b/lib/js/test/test-int64.html
@@ -25,6 +25,7 @@
       <script src="build/js/thrift.js" type="text/javascript" charset="utf-8"></script>
       <!-- browserified node-int64 -->
       <script src="build/js/lib/Int64.js" type="text/javascript" charset="utf-8"></script>
+      <script src="build/js/lib/JSONInt64.js" type="text/javascript" charset="utf-8"></script>
       <!-- int64 constants to check -->
       <script src="gen-js/Int64Test_types.js" type="text/javascript" charset="utf-8"></script>
 
diff --git a/lib/js/test/test-int64.js b/lib/js/test/test-int64.js
index 4df87e1..cf7e828 100644
--- a/lib/js/test/test-int64.js
+++ b/lib/js/test/test-int64.js
@@ -86,6 +86,12 @@
     for (let i = 0; i < EXPECTED_INT64_LIST.length; ++i) {
       assert.ok(EXPECTED_INT64_LIST[i].equals(Int64Test.INT64_LIST[i]));
     }
+
+    for (let i = 0; i < EXPECTED_INT64_LIST.length; ++i){
+      let int64Object = EXPECTED_INT64_LIST[i];
+      assert.ok(Int64Test.INT64_2_INT64_MAP[JSONInt64.toDecimalString(int64Object)].equals(int64Object));
+    }
+
     console.log('Int64 test -- ends');
   });