@@ -2,7 +2,6 @@ const Orbs = require("../../dist/index.js");
2
2
const Gamma = require ( "./../Gamma" ) ;
3
3
4
4
describe ( "E2E nodejs" , ( ) => {
5
-
6
5
beforeEach ( async ( ) => {
7
6
jest . setTimeout ( 60000 ) ;
8
7
await Gamma . start ( ) ;
@@ -13,7 +12,6 @@ describe("E2E nodejs", () => {
13
12
} ) ;
14
13
15
14
test ( "SimpleTransfer" , async ( ) => {
16
-
17
15
// create sender account
18
16
const sender = Orbs . createAccount ( ) ;
19
17
@@ -25,13 +23,7 @@ describe("E2E nodejs", () => {
25
23
const client = new Orbs . Client ( endpoint , Gamma . VIRTUAL_CHAIN_ID , "TEST_NET" ) ;
26
24
27
25
// create transfer transaction
28
- const [ tx , txId ] = client . createTransaction (
29
- sender . publicKey ,
30
- sender . privateKey ,
31
- "BenchmarkToken" ,
32
- "transfer" ,
33
- [ new Orbs . ArgUint64 ( 10 ) , new Orbs . ArgAddress ( receiver . address ) ]
34
- ) ;
26
+ const [ tx , txId ] = client . createTransaction ( sender . publicKey , sender . privateKey , "BenchmarkToken" , "transfer" , [ new Orbs . ArgUint64 ( 10 ) , new Orbs . ArgAddress ( receiver . address ) ] ) ;
35
27
36
28
// send the transaction
37
29
const transferResponse = await client . sendTransaction ( tx ) ;
@@ -57,24 +49,17 @@ describe("E2E nodejs", () => {
57
49
expect ( txProofResponse . packedReceipt . byteLength ) . toBeGreaterThan ( 10 ) ;
58
50
59
51
// create balance query
60
- const query = client . createQuery (
61
- receiver . publicKey ,
62
- "BenchmarkToken" ,
63
- "getBalance" ,
64
- [ new Orbs . ArgAddress ( receiver . address ) ]
65
- ) ;
52
+ const query = client . createQuery ( receiver . publicKey , "BenchmarkToken" , "getBalance" , [ new Orbs . ArgAddress ( receiver . address ) ] ) ;
66
53
67
54
// send the query
68
55
const balanceResponse = await client . sendQuery ( query ) ;
69
56
console . log ( balanceResponse ) ;
70
57
expect ( balanceResponse . requestStatus ) . toEqual ( "COMPLETED" ) ;
71
58
expect ( balanceResponse . executionResult ) . toEqual ( "SUCCESS" ) ;
72
59
expect ( balanceResponse . outputArguments [ 0 ] ) . toEqual ( new Orbs . ArgUint64 ( 10 ) ) ;
73
-
74
60
} ) ;
75
61
76
62
test ( "TextualError" , async ( ) => {
77
-
78
63
// create client
79
64
const endpoint = Gamma . getEndpoint ( ) ;
80
65
const client = new Orbs . Client ( endpoint , Gamma . VIRTUAL_CHAIN_ID , "TEST_NET" ) ;
@@ -87,7 +72,5 @@ describe("E2E nodejs", () => {
87
72
error = e ;
88
73
}
89
74
expect ( error . toString ( ) ) . toMatch ( "http request is not a valid membuffer" ) ;
90
-
91
75
} ) ;
92
-
93
- } ) ;
76
+ } ) ;
0 commit comments