Remove the resetAllMocks call because restoreAllMocks does the same thing, plus restores the mocked method's original functionality.

This commit is contained in:
Refringe 2023-11-06 15:35:46 -05:00
parent 07930a396b
commit 65202b2aff
No known key found for this signature in database
GPG Key ID: 64E03E5F892C6F9E
3 changed files with 2 additions and 6 deletions

View File

@ -11,7 +11,7 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { ImporterUtil } from "@spt-aki/utils/ImporterUtil";
//mocks
// Manually mock for the logger.
import { WinstonLogger } from "@tests/__mocks__/WinstonLogger.mock";
export default <Environment> {
@ -23,7 +23,7 @@ export default <Environment> {
Container.registerTypes(container);
Container.registerListTypes(container);
// Override registration to the container
// Override registration to the container.
container.register<WinstonLogger>("WinstonLogger", WinstonLogger, { lifecycle: Lifecycle.Singleton });
// Import the database.

View File

@ -25,8 +25,6 @@ describe("InsuranceController", () =>
afterEach(() =>
{
// Restore all mocks to their original implementations.
vi.resetAllMocks();
vi.restoreAllMocks();
});

View File

@ -16,8 +16,6 @@ describe("BotGenerator", () =>
afterEach(() =>
{
// Restore all mocks to their original implementations.
vi.resetAllMocks();
vi.restoreAllMocks();
});