Server/project/tests/helpers/ItemHelper.test.ts
2023-10-29 22:20:30 +00:00

28 lines
592 B
TypeScript

import "reflect-metadata";
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
describe("ItemHelper", () =>
{
let itemHelper: ItemHelper;
beforeAll(() =>
{
itemHelper = globalThis.container.resolve<ItemHelper>("ItemHelper");
});
afterEach(() =>
{
jest.restoreAllMocks();
});
describe("isValidItem", () =>
{
it("should return false when item details are not available", () =>
{
const result = itemHelper.isValidItem("non-existent-item");
expect(result).toBe(false);
});
});
});