mirror of https://github.com/embarklabs/embark.git
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)
|
||||
|
|
@ -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');
|
||||
});
|
||||
|
||||
})
|
|
@ -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…
Reference in New Issue