@waxio/waxunit
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -100,3 +100,3 @@ const child_process = require('child_process'); | ||
function createAccount(account) { | ||
function createAccount(account, bytes = 1000000) { | ||
return eosjs.api.transact( | ||
@@ -153,3 +153,3 @@ { | ||
receiver: account, | ||
bytes: 1000000, | ||
bytes, | ||
}, | ||
@@ -347,5 +347,5 @@ }, | ||
{ | ||
blocksBehind: 3, | ||
// Why the random stuff? To weakly deduplicate repeated transactions | ||
blocksBehind: 3 + Math.floor(Math.random() * 3), | ||
expireSeconds: 30 + Math.floor(Math.random() * 30), | ||
expireSeconds: 300 + Math.floor(Math.random() * 3300), | ||
} | ||
@@ -352,0 +352,0 @@ ); |
{ | ||
"name": "@waxio/waxunit", | ||
"description": "wax.io blockchain smart contract unit testing framework", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "WAX", | ||
"homepage": "https://wax.io", | ||
"scripts": { | ||
"test": "jest", | ||
"lint": "prettier --single-quote --trailing-comma es5 --list-different **/*.js", | ||
@@ -14,7 +15,9 @@ "prettier": "prettier --single-quote --trailing-comma es5 --write **/*.js" | ||
"dependencies": { | ||
"eosjs": "^22.1.0" | ||
"eosjs": "^22.1.0", | ||
"node-fetch": "^2.6.7" | ||
}, | ||
"devDependencies": { | ||
"jest": "^27.5.0", | ||
"prettier": "^2.5.1" | ||
} | ||
} |
@@ -38,3 +38,3 @@ # waxunit | ||
await createAccount('mycontract11'); | ||
await setContract( | ||
@@ -74,2 +74,7 @@ 'mycontract11', | ||
it('my test case', async () => { | ||
const balances = await getTableRows( | ||
'eosio.token', | ||
`accounts`, | ||
'mycontract11' | ||
); | ||
expect(balances.length).toEqual(1); | ||
@@ -76,0 +81,0 @@ expect(balances[0].balance).toEqual('200.00000000 WAX'); |
40526
8
407
83
2
2
+ Addednode-fetch@^2.6.7
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)