mirror of https://github.com/embarklabs/embark.git
Merge branch 'develop' of github.com:iurimatias/embark-framework into one_version
This commit is contained in:
commit
2de9292bd6
|
@ -21,6 +21,8 @@ module.exports = (grunt) ->
|
|||
mochaTest:
|
||||
test:
|
||||
src: ['test/**/*.js']
|
||||
options:
|
||||
timeout: 0
|
||||
jshint:
|
||||
all: ['bin/embark', 'lib/**/*.js', 'js/mine.js', 'js/embark.js']
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ var web3 = EmbarkSpec.web3;
|
|||
|
||||
//describe("SimpleStorage", function() {
|
||||
// before(function(done) {
|
||||
// this.timeout(0);
|
||||
// var contractsConfig = {
|
||||
// "SimpleStorage": {
|
||||
// args: [100, '0x123']
|
||||
|
|
|
@ -93,7 +93,7 @@ $(document).ready(function() {
|
|||
if (err) {
|
||||
$("#communication .error").show();
|
||||
$("#communication-controls").hide();
|
||||
+ $("#status-communication").addClass('status-offline');
|
||||
$("#status-communication").addClass('status-offline');
|
||||
} else {
|
||||
EmbarkJS.Messages.setProvider('whisper');
|
||||
$("#status-communication").addClass('status-online');
|
||||
|
|
|
@ -5,6 +5,7 @@ var web3 = EmbarkSpec.web3;
|
|||
|
||||
describe("SimpleStorage", function() {
|
||||
before(function(done) {
|
||||
this.timeout(0);
|
||||
var contractsConfig = {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
|
|
|
@ -33,10 +33,11 @@ Cmd.prototype.newApp = function() {
|
|||
.description('new application')
|
||||
.action(function(name, options) {
|
||||
if (name === undefined) {
|
||||
|
||||
console.log("please specify your app Name".red);
|
||||
console.log("e.g embark new MyApp".green);
|
||||
console.log("e.g embark new --help for more information".green);
|
||||
process.exit(code);
|
||||
process.exit(9);
|
||||
}
|
||||
self.Embark.generateTemplate('boilerplate', './', name);
|
||||
});
|
||||
|
@ -120,7 +121,7 @@ Cmd.prototype.test = function() {
|
|||
.command('test')
|
||||
.description('run tests')
|
||||
.action(function() {
|
||||
shelljs.exec('mocha test/ --no-timeouts');
|
||||
shelljs.exec('mocha test');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
var Embark = require('../lib/index');
|
||||
var Cmd = require('../lib/cmd');
|
||||
|
||||
describe('embark.Cmd', function () {
|
||||
var cmd = new Cmd(Embark);
|
||||
|
||||
describe('#new', function () {
|
||||
it('it should not create an app without a name', function (done) {
|
||||
cmd.newApp(undefined, function (output) {
|
||||
var lines = output.split('\n');
|
||||
assert.equal(lines[0], 'please specify your app Name');
|
||||
assert.equal(lines[1], 'e.g embark new MyApp');
|
||||
assert.equal(lines[2], 'e.g embark new --help for more information');
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
it('it should create an app with a name', function (done) {
|
||||
var appname = 'deleteapp';
|
||||
cmd.newApp(appname, function (output) {
|
||||
var lines = output.split('\n');
|
||||
assert.equal(lines[0], 'Initializing Embark Template....');
|
||||
assert.equal(lines[1], 'Installing packages.. this can take a few seconds');
|
||||
assert.equal(lines[2], 'Init complete');
|
||||
assert.equal(lines[3], 'App ready at ./' + appname);
|
||||
});
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
|
@ -12,6 +12,8 @@ describe('embark.Compiler', function() {
|
|||
var compiler = new Compiler({logger: new TestLogger({})});
|
||||
|
||||
describe('#compile_solidity', function() {
|
||||
this.timeout(0);
|
||||
|
||||
var expectedObject = {};
|
||||
|
||||
expectedObject["SimpleStorage"] = {"code":"606060405234610000576040516020806100f083398101604052515b60008190555b505b60bf806100316000396000f300606060405263ffffffff60e060020a6000350416632a1afcd98114603657806360fe47b11460525780636d4ce63c146061575b6000565b346000576040607d565b60408051918252519081900360200190f35b34600057605f6004356083565b005b346000576040608c565b60408051918252519081900360200190f35b60005481565b60008190555b50565b6000545b905600a165627a7a72305820a250be048d43f54e9afbb37211dc73ba843d23b95863b60afe703903500077220029","realRuntimeBytecode": "606060405263ffffffff60e060020a6000350416632a1afcd98114603657806360fe47b11460525780636d4ce63c146061575b6000565b346000576040607d565b60408051918252519081900360200190f35b34600057605f6004356083565b005b346000576040608c565b60408051918252519081900360200190f35b60005481565b60008190555b50565b6000545b905600a165627a7a72305820","runtimeBytecode":"606060405263ffffffff60e060020a6000350416632a1afcd98114603657806360fe47b11460525780636d4ce63c146061575b6000565b346000576040607d565b60408051918252519081900360200190f35b34600057605f6004356083565b005b346000576040608c565b60408051918252519081900360200190f35b60005481565b60008190555b50565b6000545b905600a165627a7a72305820a250be048d43f54e9afbb37211dc73ba843d23b95863b60afe703903500077220029","swarmHash": "a250be048d43f54e9afbb37211dc73ba843d23b95863b60afe70390350007722","gasEstimates":{"creation":[20131,38200],"external":{"get()":269,"set(uint256)":20163,"storedData()":224},"internal":{}},"functionHashes":{"get()":"6d4ce63c","set(uint256)":"60fe47b1","storedData()":"2a1afcd9"},"abiDefinition":[{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initialValue","type":"uint256"}],"payable":false,"type":"constructor"}]};
|
||||
|
|
|
@ -9,6 +9,7 @@ var readFile = function(file) {
|
|||
};
|
||||
|
||||
describe('embark.Contratcs', function() {
|
||||
|
||||
describe('simple', function() {
|
||||
var contractsManager = new ContractsManager({
|
||||
contractFiles: [
|
||||
|
|
Loading…
Reference in New Issue