I've got a contract method that checks the signer of a message using the solidity ecrecover function. In my truffle test file I now want to check if this is done correctly. Therefore I need to sign a message within the testfile using a private key.
let signedMessage = await web3.personal.sign("data", accounts)
does not work with error "Method personal_sign not supported."
Any idea how to do this? Thanks for you help!