mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
update tests in templates
This commit is contained in:
parent
c25bf086f9
commit
3d9a006ecc
@ -1,24 +1,25 @@
|
|||||||
//describe("SimpleStorage", function() {
|
// /*global contract, config, it, assert*/
|
||||||
// this.timeout(0);
|
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||||
// before(function(done) {
|
|
||||||
// this.timeout(0);
|
config({
|
||||||
// var contractsConfig = {
|
contracts: {
|
||||||
// "SimpleStorage": {
|
"SimpleStorage": {
|
||||||
// args: [100]
|
args: [100]
|
||||||
// }
|
}
|
||||||
// };
|
}
|
||||||
// EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
});
|
||||||
// });
|
|
||||||
//
|
contract("SimpleStorage", function () {
|
||||||
// it("should set constructor value", async function() {
|
this.timeout(0);
|
||||||
// let result = await SimpleStorage.methods.storedData().call();
|
|
||||||
// assert.equal(result, 100);
|
it("should set constructor value", async function () {
|
||||||
// });
|
let result = await SimpleStorage.methods.storedData().call();
|
||||||
//
|
assert.strictEqual(parseInt(result, 10), 100);
|
||||||
// it("set storage value", async function() {
|
});
|
||||||
// await SimpleStorage.methods.set(150).send();
|
|
||||||
// let result = await SimpleStorage.methods.get().call();
|
it("set storage value", async function () {
|
||||||
// assert.equal(result, 150);
|
await SimpleStorage.methods.set(150).send();
|
||||||
// });
|
let result = await SimpleStorage.methods.get().call();
|
||||||
//
|
assert.strictEqual(parseInt(result, 10), 150);
|
||||||
//});
|
});
|
||||||
|
});*/
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
describe("SimpleStorage", function() {
|
/*global contract, config, it, assert*/
|
||||||
this.timeout(0);
|
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||||
before(function(done) {
|
|
||||||
this.timeout(0);
|
config({
|
||||||
var contractsConfig = {
|
contracts: {
|
||||||
"SimpleStorage": {
|
"SimpleStorage": {
|
||||||
args: [100]
|
args: [100]
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
contract("SimpleStorage", function () {
|
||||||
|
this.timeout(0);
|
||||||
|
|
||||||
it("should set constructor value", async function () {
|
it("should set constructor value", async function () {
|
||||||
let result = await SimpleStorage.methods.storedData().call();
|
let result = await SimpleStorage.methods.storedData().call();
|
||||||
assert.equal(result, 100);
|
assert.strictEqual(parseInt(result, 10), 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("set storage value", async function () {
|
it("set storage value", async function () {
|
||||||
await SimpleStorage.methods.set(150).send();
|
await SimpleStorage.methods.set(150).send();
|
||||||
let result = await SimpleStorage.methods.get().call();
|
let result = await SimpleStorage.methods.get().call();
|
||||||
assert.equal(result, 150);
|
assert.strictEqual(parseInt(result, 10), 150);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,24 +1,25 @@
|
|||||||
//describe("SimpleStorage", function() {
|
// /*global contract, config, it, assert*/
|
||||||
// this.timeout(0);
|
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||||
// before(function(done) {
|
|
||||||
// this.timeout(0);
|
config({
|
||||||
// var contractsConfig = {
|
contracts: {
|
||||||
// "SimpleStorage": {
|
"SimpleStorage": {
|
||||||
// args: [100]
|
args: [100]
|
||||||
// }
|
}
|
||||||
// };
|
}
|
||||||
// EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
});
|
||||||
// });
|
|
||||||
//
|
contract("SimpleStorage", function () {
|
||||||
// it("should set constructor value", async function() {
|
this.timeout(0);
|
||||||
// let result = await SimpleStorage.methods.storedData().call();
|
|
||||||
// assert.equal(result, 100);
|
it("should set constructor value", async function () {
|
||||||
// });
|
let result = await SimpleStorage.methods.storedData().call();
|
||||||
//
|
assert.strictEqual(parseInt(result, 10), 100);
|
||||||
// it("set storage value", async function() {
|
});
|
||||||
// await SimpleStorage.methods.set(150).send();
|
|
||||||
// let result = await SimpleStorage.methods.get().call();
|
it("set storage value", async function () {
|
||||||
// assert.equal(result, 150);
|
await SimpleStorage.methods.set(150).send();
|
||||||
// });
|
let result = await SimpleStorage.methods.get().call();
|
||||||
//
|
assert.strictEqual(parseInt(result, 10), 150);
|
||||||
//});
|
});
|
||||||
|
});*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user