remove deprecation warning; put tests back to previous method; fix eslint error

This commit is contained in:
Iuri Matias 2017-03-11 22:16:24 -05:00
parent 8cc139e54c
commit 3a50dbdfdd
6 changed files with 7 additions and 19 deletions

View File

@ -1,5 +1,5 @@
var assert = require('assert');
var Embark = require('embark')();
var Embark = require('embark');
var EmbarkSpec = Embark.initTests();
var web3 = EmbarkSpec.web3;

View File

@ -1,5 +1,5 @@
var assert = require('assert');
var Embark = require('embark')();
var Embark = require('embark');
var EmbarkSpec = Embark.initTests();
var web3 = EmbarkSpec.web3;

View File

@ -13,7 +13,7 @@ var Swarm = require('./upload/swarm.js');
var version = require('../package.json').version;
var Embark = function () {
var Embark = (function () {
function initConfig (env, options) {
var Events = require('./core/events.js');
var Logger = require('./core/logger.js');
@ -196,19 +196,7 @@ var Embark = function () {
upload: upload
};
}();
Embark.initTests = function() {
console.error("=============================".green);
console.error("deprecated: Starting with Embark 2.5.0 the Embark object needs to be initialized".red);
console.log("replace:");
console.log("var Embark = require('embark');");
console.log("with:");
console.log("var Embark = require('embark')();");
console.error("=============================".green);
var embark = Embark();
return embark.initTests();
};
})();
module.exports = Embark;

View File

@ -1,5 +1,5 @@
var assert = require('assert');
var Embark = require('embark')();
var Embark = require('embark');
var EmbarkSpec = Embark.initTests();
var web3 = EmbarkSpec.web3;

View File

@ -1,5 +1,5 @@
var assert = require('assert');
var Embark = require('embark')();
var Embark = require('embark');
var EmbarkSpec = Embark.initTests();
var web3 = EmbarkSpec.web3;

View File

@ -1,5 +1,5 @@
var assert = require('assert');
var Embark = require('embark')();
var Embark = require('embark');
var EmbarkSpec = Embark.initTests();
var web3 = EmbarkSpec.web3;