From 9351f62ea8b73f213698efb5fa9f1910fe6f7a38 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 15 Mar 2024 16:23:19 +0000 Subject: [PATCH] feat(cb2-10665): revert use of test jwt json in logger unit tests --- tests/unit/common/Logger.unitTest.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/common/Logger.unitTest.ts b/tests/unit/common/Logger.unitTest.ts index 3c5d978..aab5efc 100644 --- a/tests/unit/common/Logger.unitTest.ts +++ b/tests/unit/common/Logger.unitTest.ts @@ -3,13 +3,12 @@ import { ILogEvent } from "../../../src/models/ILogEvent"; import errorLogEvent from "../../resources/errorLogEvent.json"; import { writeLogMessage } from "../../../src/common/Logger"; import successLogEvent from "../../resources/successLogEvent.json"; -import jwtJson from "../../resources/jwt.json"; +import Role from "../../../src/services/roles"; describe("test writeLogMessage method", () => { const logError: ILogError = {}; const logErrorEvent: ILogEvent = errorLogEvent; - const jwtJsonClone = JSON.parse(JSON.stringify(jwtJson)); - logErrorEvent.roles = jwtJsonClone.payload.roles; + logErrorEvent.roles = [{name: "test", access: "read"}] as Role[]; context("when only the log event is passed in", () => { it("should return no errors", () => {