While exploring solidity code testing with truffle, I encountered the need to work with BigNumber
values returned from or sent to contracts and decided to include the appropriate library. My current test consists of just one line:
let BigNumber = require('bignumber.js');
This test file is named hello_test.js.
When running the command npm ls -g | grep bignumber
, it confirms that
+-- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="385a515f564d555a5d4a16524b780f">[email protected]</a>
is installed. However, when trying to execute:
truffle.cmd test .\test\hello_test.js
An error occurs:
Error: Cannot find module 'bignumber.js'
I am puzzled by this issue. Any insights?
Running Truffle version 4.0.6 and npm version 5.6.0