From 8c7c4ac8d7dc025b1189ddeb3a0ccc0b952e6682 Mon Sep 17 00:00:00 2001 From: Eugene Terehov Date: Tue, 15 Dec 2020 14:58:44 +0200 Subject: [PATCH] Get test coverage back to 100% --- tests/error.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/error.test.ts b/tests/error.test.ts index 5a1327ac..68e300e0 100644 --- a/tests/error.test.ts +++ b/tests/error.test.ts @@ -43,6 +43,13 @@ describe("Logger: Error with details", () => { stdErr = []; }); + test("JSON: Check Error.toJSON()", (): void => { + const error = new TestError("TestError"); + const errorToJson = JSON.stringify(error); + + expect(errorToJson.length).toBeGreaterThan(0); + }); + test("Pretty: Error with details (stdErr)", (): void => { const error = new TestError("TestError"); loggerPretty.warn(error);