mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
fix logging in test
This commit is contained in:
parent
5ae091ffb5
commit
b0458c6fab
23
demo/test/simple_storage2_spec.js
Normal file
23
demo/test/simple_storage2_spec.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
var assert = require('assert');
|
||||||
|
//var Embark = require('embark-framework');
|
||||||
|
var Embark = require('../../lib/index.js');
|
||||||
|
var EmbarkSpec = Embark.initTests();
|
||||||
|
|
||||||
|
describe("SimpleStorage", function() {
|
||||||
|
before(function(done) {
|
||||||
|
var contractsConfig = {
|
||||||
|
"token": {
|
||||||
|
args: [1000]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
EmbarkSpec.deployAll(contractsConfig, done);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should get balance", function(done) {
|
||||||
|
token.coinBalanceOf(EmbarkSpec.web3.eth.defaultAccount, function(err, result) {
|
||||||
|
assert.equal(result.toNumber(), 1000);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
@ -3,7 +3,7 @@ var Web3 = require('web3');
|
|||||||
var Embark = require('./index.js');
|
var Embark = require('./index.js');
|
||||||
var ContractsManager = require('./contracts.js');
|
var ContractsManager = require('./contracts.js');
|
||||||
var Deploy = require('./deploy.js');
|
var Deploy = require('./deploy.js');
|
||||||
var TestLogger = require('./logger.js');
|
var TestLogger = require('./test_logger.js');
|
||||||
var Config = require('./config.js');
|
var Config = require('./config.js');
|
||||||
var ABIGenerator = require('./abi.js');
|
var ABIGenerator = require('./abi.js');
|
||||||
|
|
||||||
@ -29,7 +29,6 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function buildContracts(callback) {
|
function buildContracts(callback) {
|
||||||
|
|
||||||
var config = new Config('test');
|
var config = new Config('test');
|
||||||
config.contractsFiles = config.loadFiles(["app/contracts/**"]);
|
config.contractsFiles = config.loadFiles(["app/contracts/**"]);
|
||||||
config.contractsConfig = {contracts: contractsConfig} ;
|
config.contractsConfig = {contracts: contractsConfig} ;
|
||||||
|
@ -6,8 +6,6 @@ var TestLogger = function(options) {
|
|||||||
this.logLevels = ['error', 'warn', 'info', 'debug', 'trace'];
|
this.logLevels = ['error', 'warn', 'info', 'debug', 'trace'];
|
||||||
this.logs = [];
|
this.logs = [];
|
||||||
this.logLevel = options.logLevel || 'info';
|
this.logLevel = options.logLevel || 'info';
|
||||||
this.contractsState = options.contractsState || console.log;
|
|
||||||
this.availableServices = options.availableServices || console.log;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TestLogger.prototype.logFunction = function() {
|
TestLogger.prototype.logFunction = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user