Skip to content

Commit

Permalink
Testcoverage for tests
Browse files Browse the repository at this point in the history
Co-authored-by: IosifKoen <[email protected]>
  • Loading branch information
cetceeve and sifisKoen committed Dec 16, 2023
1 parent 29774cb commit 6f7e721
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: codecov
"on":
push:
branches:
- main
jobs:
uploader:
runs-on: ubuntu-latest
steps:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 0 additions & 4 deletions app/src/lib/History.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
import { Link } from "svelte-routing";
const web3 = new Web3(window.ethereum);
//let etherscanURL = `https://api.etherscan.io/api?module=logs&action=getLogs&fromBlock=10221728&toBlock=${web3.eth.getBlockNumber()}&address=0x5f0B6625541d613ea33098d2afdE2aE466dbF1ec&topic0=${web3.eth.abi.encodeEventSignature('PassportUpdate(uint256,address,uint8,string,string,string,string,string)')}&topic0_1_opr=and&topic1=${web3.eth.abi.encodeParameter("uint256", tokenId)}&page=1&offset=10&apikey=8GMF6CSE9AW2BQ2T5XZHT5BGJPBQSSY29H`;
//console.log(etherscanURL)
//fetch(etherscanURL).then((res) => res.json()).then((data) => console.log(data)).catch((err) => console.error(err))
async function getHistory() {
let history = await contract.getPastEvents("PassportUpdate", {
filter: {
Expand Down
5 changes: 5 additions & 0 deletions contract/test/ItemBlocksTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ contract ItemBlocksTest is Test{
itemBlocks.safeMint(address(42), 0);
assertEq(itemBlocks.ownerOf(0), address(42));
}

function testFailSafeMintZeroAddress() public {
vm.prank(address(0));
itemBlocks.safeMint(address(0), 0);
}

// TESTS FOR isEligible
// should pass because 42 minted token 12
Expand Down

0 comments on commit 6f7e721

Please sign in to comment.