I've a smart contract under test, which exposes a public property of type address bestSeller:

contract Club {
    address public owner;
    uint public price; //price to join the Club
    uint public membersCount;
    uint public bestSale; //the best sale till now
    address public bestSeller; //the user who presented more users

so now I reduced my test to the minimum necessary to reproduce the problem, and it looks like:

it("report correctly the best seller"),async () => {

  let bestSeller =  await instance.bestSeller.call();

all the test works, except this one that remain in "pending", as reported by truffle test:

enter image description here

What can be the problem?

1 Answer 1

 it("report correctly the best seller"), async () => {
     let bestSeller =  await instance.bestSeller.call();
 } // guess you didn't have ')' here, cause if it were there, it does not run


 it("report correctly the best seller", async () => {
     let bestSeller =  await instance.bestSeller.call();

Watch out for the parenthesis!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.