I'm trying to test functions of a library with Truffle. But they don't seem to be available.
The library is named
Commons and I include it as I would include a contract:
var Commons = artifacts.require("./Commons.sol");
But if I do
let foo = Commons.new(); let returnValue = foo.getBalancePeriod(5);
TypeError: foo.getBalancePeriod is not a function
If I instead do
let returnValue = Commons.getBalancePeriod(5);
I just get:
TypeError: Commons.getBalancePeriod is not a function
I made sure that the function name is exactly as it was defined in the library but the function just doesn't seem to exist.