mirror of https://github.com/embarklabs/embark.git
update demo
This commit is contained in:
parent
27c45ba62d
commit
13b7a9f2e5
|
@ -66,7 +66,8 @@ program.command('demo').description('create a working dapp with a SimpleStorage
|
|||
|
||||
var targetDir = "./embark_demo";
|
||||
wrench.copyDirSyncRecursive(boilerPath, targetDir);
|
||||
wrench.copyDirSyncRecursive(demoPath, targetDir + "/app", {forceDelete: true});
|
||||
wrench.copyDirSyncRecursive(demoPath + "/app", targetDir + "/app", {forceDelete: true});
|
||||
wrench.copyDirSyncRecursive(demoPath + "/spec", targetDir + "/spec", {forceDelete: true});
|
||||
|
||||
cd(targetDir);
|
||||
run('npm install');
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
}
|
2
index.js
2
index.js
|
@ -12,8 +12,6 @@ var syncMe = require('sync-me');
|
|||
var methodmissing = require('methodmissing');
|
||||
var jasmine = require('jasmine');
|
||||
|
||||
console.log("embark required");
|
||||
|
||||
embark = {}
|
||||
embark.Tests = require('./lib/test.js');
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
Loading…
Reference in New Issue