mirror of https://github.com/embarklabs/embark.git
Merge pull request #772 from embark-framework/expand_test
update examples
This commit is contained in:
commit
228eaef331
|
@ -1,12 +1,24 @@
|
||||||
// /*global contract, config, it, assert*/
|
// /*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({
|
config({
|
||||||
|
//deployment: {
|
||||||
|
// accounts: [
|
||||||
|
// // you can configure custom accounts with a custom balance
|
||||||
|
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||||
|
// ]
|
||||||
|
//},
|
||||||
contracts: {
|
contracts: {
|
||||||
"SimpleStorage": {
|
"SimpleStorage": {
|
||||||
args: [100]
|
args: [100]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, (_err, web3_accounts) => {
|
||||||
|
accounts = web3_accounts
|
||||||
});
|
});
|
||||||
|
|
||||||
contract("SimpleStorage", function () {
|
contract("SimpleStorage", function () {
|
||||||
|
@ -22,4 +34,10 @@ contract("SimpleStorage", function () {
|
||||||
let result = await SimpleStorage.methods.get().call();
|
let result = await SimpleStorage.methods.get().call();
|
||||||
assert.strictEqual(parseInt(result, 10), 150);
|
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*/
|
/*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({
|
config({
|
||||||
|
//deployment: {
|
||||||
|
// accounts: [
|
||||||
|
// // you can configure custom accounts with a custom balance
|
||||||
|
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||||
|
// ]
|
||||||
|
//},
|
||||||
contracts: {
|
contracts: {
|
||||||
"SimpleStorage": {
|
"SimpleStorage": {
|
||||||
args: [100]
|
args: [100]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, (_err, web3_accounts) => {
|
||||||
|
accounts = web3_accounts
|
||||||
});
|
});
|
||||||
|
|
||||||
contract("SimpleStorage", function () {
|
contract("SimpleStorage", function () {
|
||||||
|
@ -22,4 +33,9 @@ contract("SimpleStorage", function () {
|
||||||
let result = await SimpleStorage.methods.get().call();
|
let result = await SimpleStorage.methods.get().call();
|
||||||
assert.strictEqual(parseInt(result, 10), 150);
|
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*/
|
// /*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({
|
config({
|
||||||
|
//deployment: {
|
||||||
|
// accounts: [
|
||||||
|
// // you can configure custom accounts with a custom balance
|
||||||
|
// // see https://embark.status.im/docs/contracts_testing.html#Configuring-accounts
|
||||||
|
// ]
|
||||||
|
//},
|
||||||
contracts: {
|
contracts: {
|
||||||
"SimpleStorage": {
|
"SimpleStorage": {
|
||||||
args: [100]
|
args: [100]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, (_err, web3_accounts) => {
|
||||||
|
accounts = web3_accounts
|
||||||
});
|
});
|
||||||
|
|
||||||
contract("SimpleStorage", function () {
|
contract("SimpleStorage", function () {
|
||||||
|
@ -22,4 +34,10 @@ contract("SimpleStorage", function () {
|
||||||
let result = await SimpleStorage.methods.get().call();
|
let result = await SimpleStorage.methods.get().call();
|
||||||
assert.strictEqual(parseInt(result, 10), 150);
|
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