Server/project/tests/helpers/ItemHelper.test.ts

28 lines
592 B
TypeScript
Raw Normal View History

import "reflect-metadata";
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
describe("ItemHelper", () =>
{
let itemHelper: ItemHelper;
2023-10-26 22:01:59 +02:00
beforeAll(() =>
{
2023-10-26 22:01:59 +02:00
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);
});
});
});