From f362f4eddc1753f7bf9c353a7e20180dd661e118 Mon Sep 17 00:00:00 2001 From: Alex McAuliffe Date: Sat, 31 Aug 2024 17:35:46 +0000 Subject: [PATCH] Remove failing profile fixer tests (!404) The code this was testing has been deleted so these tests were failing, don't see any point to keep the empty file after deleting the tests that are gone. Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/404 Co-authored-by: Alex McAuliffe Co-committed-by: Alex McAuliffe --- .../services/ProfileFixerService.test.ts | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 project/tests/services/ProfileFixerService.test.ts diff --git a/project/tests/services/ProfileFixerService.test.ts b/project/tests/services/ProfileFixerService.test.ts deleted file mode 100644 index c0a75805..00000000 --- a/project/tests/services/ProfileFixerService.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { ProfileFixerService } from "@spt/services/ProfileFixerService"; -import { container } from "tsyringe"; -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; - -describe("ProfileFixerService", () => { - let profileFixerService: any; // Using "any" to access private/protected methods without type errors. - - beforeEach(() => { - profileFixerService = container.resolve("ProfileFixerService"); - }); - - afterEach(() => { - vi.restoreAllMocks(); - }); - - describe("FixPmcProfileIssues", () => { - it("should reset nextResupply to 0 when it is undefined", () => { - const pmcProfile = { TradersInfo: { traderId: { nextResupply: undefined } } }; - - profileFixerService.fixNullTraderNextResupply(pmcProfile); - - expect(pmcProfile.TradersInfo.traderId.nextResupply).toBe(0); - }); - - it("should not reset nextResupply to 0 when it is not undefined", () => { - const pmcProfile = { TradersInfo: { traderId: { nextResupply: 1234 } } }; - - profileFixerService.fixNullTraderNextResupply(pmcProfile); - - expect(pmcProfile.TradersInfo.traderId.nextResupply).toBe(1234); - }); - }); -});