test: fix type assertion in grid-inventory tests

This commit is contained in:
hypercross 2026-04-20 16:32:57 +08:00
parent 140b7aed86
commit 2ec0e323c4
1 changed files with 8 additions and 2 deletions

View File

@ -16,7 +16,10 @@ import {
type InventoryItem, type InventoryItem,
} from "@/samples/slay-the-spire-like/system/grid-inventory"; } from "@/samples/slay-the-spire-like/system/grid-inventory";
import { createItemIn } from "@/samples/slay-the-spire-like/system/grid-inventory/factory"; import { createItemIn } from "@/samples/slay-the-spire-like/system/grid-inventory/factory";
import type { GameItemMeta } from "@/samples/slay-the-spire-like/system/grid-inventory/types"; import type {
GameItem,
GameItemMeta,
} from "@/samples/slay-the-spire-like/system/grid-inventory/types";
import type { import type {
CardData, CardData,
ItemData, ItemData,
@ -595,7 +598,10 @@ describe("grid-inventory", () => {
const inv = createGridInventory<GameItemMeta>(6, 4); const inv = createGridInventory<GameItemMeta>(6, 4);
// Place first item manually at origin // Place first item manually at origin
const firstItem = createTestItem("existing", "oee"); const firstItem = createTestItem(
"existing",
"oee",
) as unknown as GameItem;
placeItem(inv, firstItem); placeItem(inv, firstItem);
const itemData = createTestItemData("shield", "盾牌", "o", "防御"); const itemData = createTestItemData("shield", "盾牌", "o", "防御");