Skip to content

Commit 1bc52bf

Browse files
author
Tony Crisci
committed
long test: use node 6 compatible syntax
1 parent f1e2b4a commit 1bc52bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/integration/long.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ testIfHasBigInt('test long type works correctly', async () => {
8181
expect(result === what).toEqual(true);
8282

8383
expect((async () => {
84-
return await test.EchoSigned(what + 1n);
84+
return await test.EchoSigned(what + BigInt(1));
8585
})()).rejects.toThrow();
8686

8787
// int64 min
@@ -90,7 +90,7 @@ testIfHasBigInt('test long type works correctly', async () => {
9090
expect(result === what).toEqual(true);
9191

9292
expect((async () => {
93-
return await test.EchoSigned(what - 1n);
93+
return await test.EchoSigned(what - BigInt(1));
9494
})()).rejects.toThrow();
9595

9696
// uint64 max
@@ -99,7 +99,7 @@ testIfHasBigInt('test long type works correctly', async () => {
9999
expect(result === what).toEqual(true);
100100

101101
expect((async () => {
102-
return await test.EchoUnsigned(what + 1n);
102+
return await test.EchoUnsigned(what + BigInt(1));
103103
})()).rejects.toThrow();
104104

105105
// uint64 min
@@ -108,6 +108,6 @@ testIfHasBigInt('test long type works correctly', async () => {
108108
expect(result === what).toEqual(true);
109109

110110
expect((async () => {
111-
return await test.EchoUnsigned(what - 1n);
111+
return await test.EchoUnsigned(what - BigInt(1));
112112
})()).rejects.toThrow();
113113
});

0 commit comments

Comments
 (0)