update tests in templates
This commit is contained in:
parent
c25bf086f9
commit
3d9a006ecc
|
@ -1,24 +1,25 @@
|
|||
//describe("SimpleStorage", function() {
|
||||
// this.timeout(0);
|
||||
// before(function(done) {
|
||||
// this.timeout(0);
|
||||
// var contractsConfig = {
|
||||
// "SimpleStorage": {
|
||||
// args: [100]
|
||||
// }
|
||||
// };
|
||||
// EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
||||
// });
|
||||
//
|
||||
// it("should set constructor value", async function() {
|
||||
// let result = await SimpleStorage.methods.storedData().call();
|
||||
// assert.equal(result, 100);
|
||||
// });
|
||||
//
|
||||
// it("set storage value", async function() {
|
||||
// await SimpleStorage.methods.set(150).send();
|
||||
// let result = await SimpleStorage.methods.get().call();
|
||||
// assert.equal(result, 150);
|
||||
// });
|
||||
//
|
||||
//});
|
||||
// /*global contract, config, it, assert*/
|
||||
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
config({
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
this.timeout(0);
|
||||
|
||||
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();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
});*/
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
describe("SimpleStorage", function() {
|
||||
/*global contract, config, it, assert*/
|
||||
const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
config({
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
this.timeout(0);
|
||||
before(function(done) {
|
||||
this.timeout(0);
|
||||
var contractsConfig = {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
};
|
||||
EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
||||
});
|
||||
|
||||
it("should set constructor value", async function() {
|
||||
it("should set constructor value", async function () {
|
||||
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();
|
||||
let result = await SimpleStorage.methods.get().call();
|
||||
assert.equal(result, 150);
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
//describe("SimpleStorage", function() {
|
||||
// this.timeout(0);
|
||||
// before(function(done) {
|
||||
// this.timeout(0);
|
||||
// var contractsConfig = {
|
||||
// "SimpleStorage": {
|
||||
// args: [100]
|
||||
// }
|
||||
// };
|
||||
// EmbarkSpec.deployAll(contractsConfig, () => { done() });
|
||||
// });
|
||||
//
|
||||
// it("should set constructor value", async function() {
|
||||
// let result = await SimpleStorage.methods.storedData().call();
|
||||
// assert.equal(result, 100);
|
||||
// });
|
||||
//
|
||||
// it("set storage value", async function() {
|
||||
// await SimpleStorage.methods.set(150).send();
|
||||
// let result = await SimpleStorage.methods.get().call();
|
||||
// assert.equal(result, 150);
|
||||
// });
|
||||
//
|
||||
//});
|
||||
// /*global contract, config, it, assert*/
|
||||
/*const SimpleStorage = require('Embark/contracts/SimpleStorage');
|
||||
|
||||
config({
|
||||
contracts: {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
contract("SimpleStorage", function () {
|
||||
this.timeout(0);
|
||||
|
||||
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();
|
||||
assert.strictEqual(parseInt(result, 10), 150);
|
||||
});
|
||||
});*/
|
||||
|
|
Loading…
Reference in New Issue