2023-10-27 23:48:24 +02:00
|
|
|
import "reflect-metadata";
|
|
|
|
|
2023-10-28 05:55:34 +02:00
|
|
|
import { vi, beforeAll, afterEach, describe, expect, it } from "vitest";
|
|
|
|
|
|
|
|
import { DependencyContainer } from "tsyringe";
|
2023-10-27 23:48:24 +02:00
|
|
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
|
|
|
|
|
|
|
describe("PaymentService", () =>
|
|
|
|
{
|
|
|
|
let container: DependencyContainer;
|
|
|
|
let paymentService: PaymentService;
|
|
|
|
|
|
|
|
beforeAll(() =>
|
|
|
|
{
|
2023-10-28 05:55:34 +02:00
|
|
|
container = global.container;
|
2023-10-27 23:48:24 +02:00
|
|
|
paymentService = container.resolve<PaymentService>("PaymentService");
|
|
|
|
});
|
|
|
|
|
|
|
|
afterEach(() =>
|
|
|
|
{
|
2023-10-28 05:55:34 +02:00
|
|
|
vi.restoreAllMocks();
|
2023-10-27 23:48:24 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("should be registered", () =>
|
|
|
|
{
|
|
|
|
it("should be registered", () =>
|
|
|
|
{
|
|
|
|
expect(paymentService).toBeDefined();
|
|
|
|
expect(container.isRegistered("PaymentService")).toBe(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|