mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 06:16:01 +00:00
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');
|
||||
|
17
demo/spec/contracts/simple_storage_spec.js
Normal file
17
demo/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
demo/spec/support/jasmine.json
Normal file
9
demo/spec/support/jasmine.json
Normal file
@ -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…
x
Reference in New Issue
Block a user