Following this https://docs.zeppelinos.org/docs/testing.html
const { TestHelper } = require('zos');
const { Contracts, ZWeb3 } = require('zos-lib');
ZWeb3.initialize('http://localhost:8545');
const Key = Contracts.getFromLocal('Key');
require('chai').should();
contract('Key', async () => {
describe('Write information to ledger', () => {
beforeEach(async () => {
this.project = await TestHelper();
});
describe('Node Ethereum Address', function() {
it('Valid Node Ethereum Address', async () => {
const proxy = await this.project.createProxy(Key);
...
I Get this error:
Using network 'development'.
TypeError: Cannot read property 'Contract' of undefined
at Function.contract (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/zos-lib/src/artifacts/ZWeb3.ts:57:28)
at Object.createZosContract (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/zos-lib/src/artifacts/Contract.ts:106:26)
at Function._getFromPath (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/zos-lib/src/artifacts/Contracts.ts:98:12)
at Function.getFromLocal (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/zos-lib/src/artifacts/Contracts.ts:53:22)
at Object.<anonymous> (/home/emiller/src/olypsis/block-n-key/smart-contracts/test/test_Key.js:6:23)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at loader (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/emiller/src/olypsis/block-n-key/smart-contracts/node_modules/babel-register/lib/node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /home/emiller/.local/share/yarn/global/node_modules/mocha/lib/mocha.js:231:27
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/home/emiller/.local/share/yarn/global/node_modules/mocha/lib/mocha.js:228:14)
at Mocha.run (/home/emiller/.local/share/yarn/global/node_modules/mocha/lib/mocha.js:536:10)
at /home/emiller/.local/share/yarn/global/node_modules/truffle/build/webpack:/packages/truffle-core/lib/test.js:118:1
at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.0.2 (core: 5.0.2)
Node v10.13.0