From 7e6cf98afadeb74ccb9fb04efa905f80b10d860e Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Fri, 5 Apr 2024 05:04:22 +0100 Subject: [PATCH] fix(create-mud): add test for threejs template (#2617) --- .../packages/contracts/test/WorldTest.t.sol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 templates/threejs/packages/contracts/test/WorldTest.t.sol diff --git a/templates/threejs/packages/contracts/test/WorldTest.t.sol b/templates/threejs/packages/contracts/test/WorldTest.t.sol new file mode 100644 index 0000000000..b108b43341 --- /dev/null +++ b/templates/threejs/packages/contracts/test/WorldTest.t.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.24; + +import "forge-std/Test.sol"; +import { MudTest } from "@latticexyz/world/test/MudTest.t.sol"; +import { IWorld } from "../src/codegen/world/IWorld.sol"; + +contract WorldTest is MudTest { + function testWorldExists() public { + uint256 codeSize; + address addr = worldAddress; + assembly { + codeSize := extcodesize(addr) + } + assertTrue(codeSize > 0); + } +}