Removed usage of global.container
Importing container from tsyringe directly seems to work fine.
This commit is contained in:
parent
ba32350751
commit
b31a48066b
@ -1,21 +1,18 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
import { container } from "tsyringe";
|
||||
import { vi, beforeAll, afterEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { Item, Repairable } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
|
||||
describe("ItemHelper", () =>
|
||||
{
|
||||
let container: DependencyContainer;
|
||||
let itemHelper: ItemHelper;
|
||||
|
||||
beforeAll(() =>
|
||||
{
|
||||
container = global.container;
|
||||
itemHelper = container.resolve<ItemHelper>("ItemHelper");
|
||||
});
|
||||
|
||||
|
@ -1,18 +1,15 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
import { container } from "tsyringe";
|
||||
import { vi, beforeAll, afterEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||
|
||||
describe("PaymentService", () =>
|
||||
{
|
||||
let container: DependencyContainer;
|
||||
let paymentService: PaymentService;
|
||||
|
||||
beforeAll(() =>
|
||||
{
|
||||
container = global.container;
|
||||
paymentService = container.resolve<PaymentService>("PaymentService");
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user