There was an error while loading. Please reload this page.
mockItems is a mock for a Collection of items (like game.items). The mock is rather bare, really only covering get.
game.items
get
import { beforeEach, afterEach, describe, expect, it, vi } from 'vitest' import { getID } from '@revolutionarygamesco/common-foundryvtt' import { mockItems, mockItem } from '@revolutionarygamesco/common-foundryvtt/mocks' const item = mockItem({ name: 'Test' }) const dict: Record<string, foundry.documents.Item> = {} dict[getID(item.uuid)] = item mockItems(dict)