diff --git a/lib/environment.js b/lib/environment.js index 2c0d0d7..38a481d 100644 --- a/lib/environment.js +++ b/lib/environment.js @@ -14,6 +14,11 @@ class TruffleEnvironment extends NodeEnvironment { this.global.accounts = this.global.__truffleTest.accounts; this.global.web3 = this.global.__truffleTest.web3; this.global.runner = this.global.__truffleTest.runner; + this.global.contract = (name, body) => { + this.global.describe(name, () => { + body(this.global.accounts, this.global.web3) + }) + }; return new Promise(resolve => { this.global.__truffleTest.runner.initialize(resolve);