mirror of https://github.com/embarklabs/embark.git
fix error in solc-tests
This commit is contained in:
parent
c6aa19a772
commit
e450c0484a
|
@ -65,7 +65,7 @@ class TestRunner {
|
|||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
self.logger.info(`Coverage report created. You can find it here: ${fs.dappPath('coverage/__root__/index.html')}\n`);
|
||||
console.info(`Coverage report created. You can find it here: ${fs.dappPath('coverage/__root__/index.html')}\n`);
|
||||
const opn = require('opn');
|
||||
const _next = () => { next(null, results); };
|
||||
if (options.noBrowser) {
|
||||
|
@ -86,7 +86,7 @@ class TestRunner {
|
|||
if (totalFailures) {
|
||||
return cb(` > Total number of failures: ${totalFailures}`.red.bold);
|
||||
}
|
||||
self.logger.info(' > All tests passed'.green.bold);
|
||||
console.info(' > All tests passed'.green.bold);
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ class TestRunner {
|
|||
|
||||
let deprecatedWarning = function () {
|
||||
self.logger.error(__('%s are not supported anymore', 'EmbarkSpec & deployAll').red);
|
||||
self.logger.info(__('You can learn about the new revamped tests here: %s', 'https://embark.status.im/docs/testing.html'.underline));
|
||||
self.logger.error(__('You can learn about the new revamped tests here: %s', 'https://embark.status.im/docs/testing.html'.underline));
|
||||
process.exit();
|
||||
};
|
||||
|
||||
|
@ -200,7 +200,7 @@ class TestRunner {
|
|||
}
|
||||
|
||||
runSolidityTests(files, options, cb) {
|
||||
this.logger.info('Running solc tests');
|
||||
console.info('Running solc tests');
|
||||
const loglevel = options.loglevel || 'warn';
|
||||
|
||||
let solcTest = new SolcTest({loglevel, node: options.node, events: this.events, logger: this.logger,
|
||||
|
|
|
@ -70,7 +70,7 @@ class SolcTest extends Test {
|
|||
|
||||
runTests(file, cb) {
|
||||
const self = this;
|
||||
self.logger.info('Running tests'.cyan);
|
||||
console.info('Running tests'.cyan);
|
||||
const forwardSlashFile = file.replace(/\\/g, '/');
|
||||
|
||||
async.waterfall([
|
||||
|
@ -124,13 +124,13 @@ class SolcTest extends Test {
|
|||
|
||||
_prettyPrint(obj) {
|
||||
if (obj.type === 'contract') {
|
||||
this.logger.info(color('suite', '%s'), obj.value);
|
||||
console.info(color('suite', '%s'), obj.value);
|
||||
} else if(obj.type === 'testPass') {
|
||||
let fmt = color('checkmark', ' ' + Base.symbols.ok) + color('pass', ' %s');
|
||||
this.logger.info(fmt, obj.value);
|
||||
console.info(fmt, obj.value);
|
||||
} else if(obj.type === 'testFailure') {
|
||||
let fmt = color('fail', ' %s %s');
|
||||
this.logger.info(fmt, Base.symbols.err, obj.value);
|
||||
console.info(fmt, Base.symbols.err, obj.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ class Test {
|
|||
|
||||
init(callback) {
|
||||
|
||||
this.gasLimit = 6000000;
|
||||
this.events.request('deploy:setGasLimit', this.gasLimit);
|
||||
this.events.request('blockchain:object', (connector) => {
|
||||
this.blockchainConnector = connector;
|
||||
if (this.options.node !== 'embark') {
|
||||
|
@ -186,7 +188,7 @@ class Test {
|
|||
if (!self.firstDeployment) {
|
||||
return next();
|
||||
}
|
||||
self.logger.info('Compiling contracts'.cyan);
|
||||
console.info('Compiling contracts'.cyan);
|
||||
self.events.request("contracts:build", false, (err) => {
|
||||
self.firstDeployment = false;
|
||||
next(err);
|
||||
|
|
Loading…
Reference in New Issue