Replies: 1 comment 2 replies
-
@ronmaa Then you should write the same name here instead of This is called destructuring in JavaScript, you can read about this topic for more information. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have implemented a slightly different version of the contract and test.
How is the return value of checkUpKeep extracted in this line?
const { upkeepNeeded } = await lotteryContract.checkUpkeep("0x");
assert.equal(upkeepNeeded, false);
If I change the name of the variable to anything other than "upkeepNeeded" , the test fails and the variable is undefined. How does this occur? How is my test able to know the name of the variable used inside my contract?
Beta Was this translation helpful? Give feedback.
All reactions