mirror of https://github.com/embarklabs/embark.git
add backwards compatbility for tests with a deprecation message
This commit is contained in:
parent
1534bf6207
commit
9eb4887d37
12
lib/index.js
12
lib/index.js
|
@ -198,5 +198,17 @@ var Embark = function () {
|
|||
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
var assert = require('assert');
|
||||
var Embark = require('embark');
|
||||
var Embark = require('embark')();
|
||||
var EmbarkSpec = Embark.initTests();
|
||||
var web3 = EmbarkSpec.web3;
|
||||
|
||||
describe("AnotherStorage", function() {
|
||||
before(function(done) {
|
||||
this.timeout(0);
|
||||
var contractsConfig = {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
var assert = require('assert');
|
||||
var Embark = require('embark');
|
||||
var Embark = require('embark')();
|
||||
var EmbarkSpec = Embark.initTests();
|
||||
var web3 = EmbarkSpec.web3;
|
||||
|
||||
describe("SimpleStorage", function() {
|
||||
before(function(done) {
|
||||
this.timeout(0);
|
||||
var contractsConfig = {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
var assert = require('assert');
|
||||
var Embark = require('embark');
|
||||
var Embark = require('embark')();
|
||||
var EmbarkSpec = Embark.initTests();
|
||||
var web3 = EmbarkSpec.web3;
|
||||
|
||||
describe("Token", function() {
|
||||
before(function(done) {
|
||||
this.timeout(0);
|
||||
var contractsConfig = {
|
||||
"SimpleStorage": {
|
||||
args: [100]
|
||||
|
|
Loading…
Reference in New Issue