mirror of https://github.com/embarklabs/embark.git
fix logging in test
This commit is contained in:
parent
5ae091ffb5
commit
b0458c6fab
|
@ -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 ContractsManager = require('./contracts.js');
|
||||
var Deploy = require('./deploy.js');
|
||||
var TestLogger = require('./logger.js');
|
||||
var TestLogger = require('./test_logger.js');
|
||||
var Config = require('./config.js');
|
||||
var ABIGenerator = require('./abi.js');
|
||||
|
||||
|
@ -29,7 +29,6 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||
|
||||
async.waterfall([
|
||||
function buildContracts(callback) {
|
||||
|
||||
var config = new Config('test');
|
||||
config.contractsFiles = config.loadFiles(["app/contracts/**"]);
|
||||
config.contractsConfig = {contracts: contractsConfig} ;
|
||||
|
|
|
@ -6,8 +6,6 @@ var TestLogger = function(options) {
|
|||
this.logLevels = ['error', 'warn', 'info', 'debug', 'trace'];
|
||||
this.logs = [];
|
||||
this.logLevel = options.logLevel || 'info';
|
||||
this.contractsState = options.contractsState || console.log;
|
||||
this.availableServices = options.availableServices || console.log;
|
||||
};
|
||||
|
||||
TestLogger.prototype.logFunction = function() {
|
||||
|
|
Loading…
Reference in New Issue