Skip to content

Commit

Permalink
contract version in test pulled from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Oct 5, 2023
1 parent cf4e6d4 commit a0c4f4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/factory/ZoraCreator1155Factory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ contract ZoraCreator1155FactoryTest is Test {
}

function test_contractVersion() external {
assertEq(factory.contractVersion(), "2.0.0");
string memory package = vm.readFile("./package.json");
assertEq(package.readString(".version"), factory.contractVersion());
}

function test_contractName() external {
Expand Down
3 changes: 2 additions & 1 deletion test/nft/ZoraCreator1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ contract ZoraCreator1155Test is Test {
function test_contractVersion() external {
init();

assertEq(target.contractVersion(), "2.0.0");
string memory package = vm.readFile("./package.json");
assertEq(package.readString(".version"), target.contractVersion());
}

function test_assumeLastTokenIdMatches() external {
Expand Down

0 comments on commit a0c4f4a

Please sign in to comment.