I try to use the openzepplin/test-environnement module on my project, but when I use the contract.fromArtifact method I can’t reach my build folder with my contract in json. because of the architecture of my project, my build folder is not the root of the project.
does anyone know how to workaround ?
Environment
@openzeppelin/contract-loader : 0.5.0
@openzeppelin/test-environment : 0.1.1
Details
The architecture of my project :
|-api
|–some stuff
|–test (api test)
|-smart-contract
|–build // the build is here in smart-contract folder
|—contracts
|----contract.json
|–contracts
|—contract.sol
|–migrations
|–test (contract test)
|-test( contract + api test) // and it is here i need to found the build directory
Code to reproduce
contract.fromArtifact(‘contract’);
Error: Could not find compiled artifacts directory
at loadArtifact (node_modules/@openzeppelin/contract-loader/lib/index.js:15:15)
at Object.fromArtifact (node_modules/@openzeppelin/contract-loader/lib/index.js:50:18)
at Object.getState (test/state.spec.js:18:31)
at Context.<anonymous> (test/foo.spec.js:18:31)
at processImmediate (internal/timers.js:456:21)