diff --git a/lib/js/test/test.js b/lib/js/test/test.js
index a86a509..35ed6ff 100755
--- a/lib/js/test/test.js
+++ b/lib/js/test/test.js
@@ -51,6 +51,9 @@
 const protocol = new Thrift.Protocol(transport);
 const client = new ThriftTest.ThriftTestClient(protocol);
 
+const int64_2_pow_60 = new Int64('1000000000000000');
+const int64_minus_2_pow_60 = new Int64('f000000000000000');
+
 // Work around for old API used by QUnitAdapter of jsTestDriver
 if (typeof QUnit.log == 'function') {
   // When using real QUnit (fron PhantomJS) log failures to console
@@ -132,9 +135,12 @@
   });
   QUnit.test('I64', function(assert) {
     assert.equal(client.testI64(0), 0);
-    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
-    assert.equal(client.testI64(Math.pow(2, 52)), Math.pow(2, 52));
-    assert.equal(client.testI64(-Math.pow(2, 52)), -Math.pow(2, 52));
+
+    let int64_2_pow_60_result = client.testI64(int64_2_pow_60);
+    assert.ok(int64_2_pow_60.equals(int64_2_pow_60_result));
+
+    let int64_minus_2_pow_60_result = client.testI64(int64_minus_2_pow_60);
+    assert.ok(int64_minus_2_pow_60.equals(int64_minus_2_pow_60_result));
   });
 
 
@@ -145,15 +151,14 @@
     structTestInput.string_thing = 'worked';
     structTestInput.byte_thing = 0x01;
     structTestInput.i32_thing = Math.pow(2, 30);
-    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
-    structTestInput.i64_thing = Math.pow(2, 52);
+    structTestInput.i64_thing = int64_2_pow_60;
 
     const structTestOutput = client.testStruct(structTestInput);
 
     assert.equal(structTestOutput.string_thing, structTestInput.string_thing);
     assert.equal(structTestOutput.byte_thing, structTestInput.byte_thing);
     assert.equal(structTestOutput.i32_thing, structTestInput.i32_thing);
-    assert.equal(structTestOutput.i64_thing, structTestInput.i64_thing);
+    assert.ok(structTestOutput.i64_thing.equals(structTestInput.i64_thing));
 
     assert.equal(JSON.stringify(structTestOutput), JSON.stringify(structTestInput));
   });
@@ -163,8 +168,7 @@
     xtrTestInput.string_thing = 'worked';
     xtrTestInput.byte_thing = 0x01;
     xtrTestInput.i32_thing = Math.pow(2, 30);
-    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
-    xtrTestInput.i64_thing = Math.pow(2, 52);
+    xtrTestInput.i64_thing = int64_2_pow_60;
 
     const nestTestInput = new ThriftTest.Xtruct2();
     nestTestInput.byte_thing = 0x02;
@@ -177,7 +181,7 @@
     assert.equal(nestTestOutput.struct_thing.string_thing, nestTestInput.struct_thing.string_thing);
     assert.equal(nestTestOutput.struct_thing.byte_thing, nestTestInput.struct_thing.byte_thing);
     assert.equal(nestTestOutput.struct_thing.i32_thing, nestTestInput.struct_thing.i32_thing);
-    assert.equal(nestTestOutput.struct_thing.i64_thing, nestTestInput.struct_thing.i64_thing);
+    assert.ok(nestTestOutput.struct_thing.i64_thing.equals(nestTestInput.struct_thing.i64_thing));
     assert.equal(nestTestOutput.i32_thing, nestTestInput.i32_thing);
 
     assert.equal(JSON.stringify(nestTestOutput), JSON.stringify(nestTestInput));
@@ -252,7 +256,7 @@
     structTestInput.string_thing = 'worked';
     structTestInput.byte_thing = 0x01;
     structTestInput.i32_thing = Math.pow(2, 30);
-    structTestInput.i64_thing = Math.pow(2, 52);
+    structTestInput.i64_thing = int64_2_pow_60;
 
     const structTestOutput = modifiedClient.testStruct(structTestInput);
 
@@ -260,7 +264,7 @@
     assert.equal(structTestOutput.string_thing, structTestInput.string_thing);
     assert.equal(structTestOutput.changed, null);
     assert.equal(structTestOutput.i32_thing, structTestInput.i32_thing);
-    assert.equal(structTestOutput.i64_thing, structTestInput.i64_thing);
+    assert.ok(structTestOutput.i64_thing.equals(structTestInput.i64_thing));
   });
 
 
@@ -332,13 +336,13 @@
       'string_thing': 'Goodbye4',
       'byte_thing': 4,
       'i32_thing': 4,
-      'i64_thing': 4
+      'i64_thing': new Int64(4)
     },
     {
       'string_thing': 'Hello2',
       'byte_thing': 2,
       'i32_thing': 2,
-      'i64_thing': 2
+      'i64_thing': new Int64(2)
     }]
   };
   QUnit.test('testInsanity', function(assert) {
@@ -401,15 +405,13 @@
     assert.expect(2);
 
     const done = assert.async(2);
-    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
-    client.testI64(Math.pow(2, 52), function(result) {
-      assert.equal(result, Math.pow(2, 52));
+    client.testI64(int64_2_pow_60, function(result) {
+      assert.ok(int64_2_pow_60.equals(result));
       done();
     });
 
-    //This is usually 2^60 but JS cannot represent anything over 2^52 accurately
-    client.testI64(Math.pow(-2, 52), function(result) {
-      assert.equal(result, Math.pow(-2, 52));
+    client.testI64(int64_minus_2_pow_60, function(result) {
+      assert.ok(int64_minus_2_pow_60.equals(result));
       done();
     });
   });
