mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-10 22:16:20 +00:00
add spec to boilerplate
This commit is contained in:
parent
1e5d704061
commit
dca33e02fc
@ -1,9 +0,0 @@
|
||||
EmbarkSpec = require("embark-framework").specs();
|
||||
|
||||
SimpleStorage = EmbarkSpec.SimpleStorage;
|
||||
|
||||
SimpleStorage.set(100);
|
||||
|
||||
a = SimpleStorage.get()
|
||||
console.log(a)
|
||||
|
17
boilerplate/spec/contracts/simple_storage_spec.js
Normal file
17
boilerplate/spec/contracts/simple_storage_spec.js
Normal file
@ -0,0 +1,17 @@
|
||||
EmbarkSpec = require('embark-framework').Tests;
|
||||
|
||||
describe("SimpleStorage", function() {
|
||||
beforeAll(function() {
|
||||
SimpleStorage = EmbarkSpec.request("SimpleStorage", [150]);
|
||||
});
|
||||
|
||||
it("should set constructor value", function() {
|
||||
expect(SimpleStorage.foo()).toEqual('150');
|
||||
});
|
||||
|
||||
it("set storage value", function() {
|
||||
SimpleStorage.set(100);
|
||||
expect(SimpleStorage.get()).toEqual('100');
|
||||
});
|
||||
|
||||
})
|
9
boilerplate/spec/support/jasmine.json
Normal file
9
boilerplate/spec/support/jasmine.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"spec_dir": "spec",
|
||||
"spec_files": [
|
||||
"**/*[sS]pec.js"
|
||||
],
|
||||
"helpers": [
|
||||
"helpers/**/*.js"
|
||||
]
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
var Tests = require('embark-framework').Tests;
|
||||
|
||||
SimpleStorage = Tests.request("SimpleStorage", 150);
|
||||
|
||||
SimpleStorage.set(100);
|
||||
|
||||
a = SimpleStorage.get()
|
||||
console.log(a)
|
||||
|
||||
a = SimpleStorage.foo()
|
||||
console.log(a)
|
||||
|
@ -7,7 +7,7 @@ var grunt = require('grunt');
|
||||
|
||||
py_exec = function(cmd) {
|
||||
console.log("python: " + cmd);
|
||||
return sync(python, cmd)[1];
|
||||
return sync(python, cmd)[1].trim();
|
||||
}
|
||||
|
||||
py_exec("from ethertdd import EvmContract")
|
||||
|
Loading…
x
Reference in New Issue
Block a user