Closed Bharath-Anbazhagan closed 6 months ago
First Of All - Thank You All, For The Courses & Support 💖 ( Especially For Equious, Who Helped Me To Do My First PR! )
Yes, This is my First Pull Request 🥳
I have completed the 2 Challenges in the CheckUpKeep Test Functions in the Raffle Project.
function testCheckUpkeepReturnsFalseIfEnoughTimeHasntPassed() public { // Arrange vm.prank(PLAYER); raffle.enterRaffle{value: raffleEntranceFee}(); // Act (bool upkeepNeeded, ) = raffle.checkUpkeep(""); // Assert assert(!upkeepNeeded); }
function testCheckUpkeepReturnsTrueWhenParametersGood() public { // Arrange vm.prank(PLAYER); raffle.enterRaffle{value: raffleEntranceFee}(); vm.warp(block.timestamp + automationUpdateInterval + 1); vm.roll(block.number + 1); // Act (bool upkeepNeeded, ) = raffle.checkUpkeep(""); // Assert assert(upkeepNeeded); }
I know that this PR will be closed as others can also try to do this! 💪
Hey Patrick & Cyfrin TEAM!
First Of All - Thank You All, For The Courses & Support 💖 ( Especially For Equious, Who Helped Me To Do My First PR! )
Yes, This is my First Pull Request 🥳
About The Pull Request ⬇️
I have completed the 2 Challenges in the CheckUpKeep Test Functions in the Raffle Project.
// Challenge 1. testCheckUpkeepReturnsFalseIfEnoughTimeHasntPassed
// Challenge 2. testCheckUpkeepReturnsTrueWhenParametersGood
Conclusion
I know that this PR will be closed as others can also try to do this! 💪