I have create a truffle project with this command:
truffle unbox react
I have run this commands:
npm install @openzeppelin/contracts
npm install @openzeppelin/test-helpers
npm install @openzeppelin/test-environment
I have removed all files in tests/ folder. I have kept sample contract SimpleStorage.sol in contracts/ folder.
I have wrote this test and i put it in a file in tests/ folder:
const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
const { accounts, contract } = require('@openzeppelin/test-environment');
const SimpleStorage = contract.fromArtifact('SimpleStorage');
describe('SimpleStorage', function () {
}
I compile and launch the tests (no error at compile step)
truffe compile
truffle test
i get this error:
Error: Could not find local build/contracts when looking for local artifacts
Any idea ?
build
folder is not correctly updated. You can try to clear it and run again 'truffle compile`.build/contracts
.