mirror of https://github.com/embarklabs/embark.git
update examples
This commit is contained in:
parent
343bf2489a
commit
10e41dd4f2
|
@ -1,12 +1,24 @@
|
|||
// /*global contract, config, it, assert*/
|
||||
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
/*
|
||||
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
let accounts;
|
||||
|
||||
// For documentation please see https://embark.status.im/docs/contracts_testing.html
|
||||
config({
|
||||
//deployment: {
|
||||
// accounts: [
|
||||
// // you can configure custom accounts with a custom balance
|
||||
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||
// ]
|
||||
//},
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
}, (_err, web3_accounts) => {
|
||||
accounts = web3_accounts
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
|
@ -22,4 +34,10 @@ contract("SimpleStorage", function () {
|
|||
let result = await SimpleStorage.methods.get().call();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
});*/
|
||||
|
||||
it("should have account with balance", async function() {
|
||||
let balance = await web3.eth.getBalance(accounts[0]);
|
||||
assert.ok(parseInt(balance, 10) > 0);
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
/*global contract, config, it, assert*/
|
||||
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
let accounts;
|
||||
|
||||
// For documentation please see https://embark.status.im/docs/contracts_testing.html
|
||||
config({
|
||||
//deployment: {
|
||||
// accounts: [
|
||||
// // you can configure custom accounts with a custom balance
|
||||
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||
// ]
|
||||
//},
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
}, (_err, web3_accounts) => {
|
||||
accounts = web3_accounts
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
|
@ -22,4 +33,9 @@ contract("SimpleStorage", function () {
|
|||
let result = await SimpleStorage.methods.get().call();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
|
||||
it("should have account with balance", async function() {
|
||||
let balance = await web3.eth.getBalance(accounts[0]);
|
||||
assert.ok(parseInt(balance, 10) > 0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
// /*global contract, config, it, assert*/
|
||||
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
/*
|
||||
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
let accounts;
|
||||
|
||||
// For documentation please see https://embark.status.im/docs/contracts_testing.html
|
||||
config({
|
||||
//deployment: {
|
||||
// accounts: [
|
||||
// // you can configure custom accounts with a custom balance
|
||||
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||
// ]
|
||||
//},
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
}, (_err, web3_accounts) => {
|
||||
accounts = web3_accounts
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
|
@ -22,4 +34,10 @@ contract("SimpleStorage", function () {
|
|||
let result = await SimpleStorage.methods.get().call();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
});*/
|
||||
|
||||
it("should have account with balance", async function() {
|
||||
let balance = await web3.eth.getBalance(accounts[0]);
|
||||
assert.ok(parseInt(balance, 10) > 0);
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue