Ch 4: Testing
Getting Started
packages/contracts/test/ClownBeatdown.t.sol// SPDX-License-Identifier: MIT License
pragma solidity ^0.8.13;
import {Test} from "forge-std/Test.sol";
import {ClownBeatdown} from "../src/ClownBeatdown.sol";
contract ClownBeatdownTest is Test {
ClownBeatdown public clownBeatdown;
function setUp() public {
clownBeatdown = new ClownBeatdown(2);
clownBeatdown.addSecret("Secret A");
clownBeatdown.addSecret("Secret B");
clownBeatdown.addSecret("Secret C");
}
}Writing Test Cases
Core functionalities
Restricting Actions
Complex scenarios
Last updated

