smartcontractkit/full-blockchain-solidity-course-js

How i can write test for this --> revert NftMarketplace__TransferFailed();

Nikhil8400 opened this issue · 0 comments

function withdrawProceeds() external {
uint256 proceeds = s_proceeds[msg.sender];
if(proceeds<=0){
revert NftMarketplace__NoProceeds();
}
s_proceeds[msg.sender] = 0;
(bool success,) = payable(msg.sender).call{value: proceeds}("");
if(!success){
revert NftMarketplace__TransferFailed();
}
}