From fcf4979bec4b84ccca158ef471066129c4e92f83 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Fri, 5 Jan 2024 19:05:00 -0700 Subject: [PATCH] Restored 60% test threshold after fixing the test environments I broke --- jest.config.ts | 2 +- src/__tests__/GoEngine_sgf.test.ts | 3 ++- src/__tests__/GobanCanvas.test.ts | 3 ++- src/__tests__/GobanCore_conditional_moves.test.ts | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index e5a093e6..d68c4e62 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -49,7 +49,7 @@ export default { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { "global": { - "lines": 30 + "lines": 60 } }, diff --git a/src/__tests__/GoEngine_sgf.test.ts b/src/__tests__/GoEngine_sgf.test.ts index 60af3614..90b90399 100644 --- a/src/__tests__/GoEngine_sgf.test.ts +++ b/src/__tests__/GoEngine_sgf.test.ts @@ -1,6 +1,5 @@ /** * @jest-environment jsdom - * cspell: disable */ // ^^ jsdom environment is because getLocation() returns window.location.pathname @@ -8,6 +7,8 @@ // // TODO: move this into a setup-jest.ts file +// cspell: disable + (global as any).CLIENT = true; import { TestGoban } from "../TestGoban"; diff --git a/src/__tests__/GobanCanvas.test.ts b/src/__tests__/GobanCanvas.test.ts index 2c75a917..3596c5c9 100644 --- a/src/__tests__/GobanCanvas.test.ts +++ b/src/__tests__/GobanCanvas.test.ts @@ -1,8 +1,9 @@ /** * @jest-environment jsdom - * cspell: disable */ +// cspell: disable + (global as any).CLIENT = true; import { GobanCanvas, GobanCanvasConfig } from "../GobanCanvas"; diff --git a/src/__tests__/GobanCore_conditional_moves.test.ts b/src/__tests__/GobanCore_conditional_moves.test.ts index 8a23771c..d76a2826 100644 --- a/src/__tests__/GobanCore_conditional_moves.test.ts +++ b/src/__tests__/GobanCore_conditional_moves.test.ts @@ -1,6 +1,5 @@ /** * @jest-environment jsdom - * cspell: disable */ // ^^ jsdom environment is because getLocation() returns window.location.pathname @@ -8,6 +7,8 @@ // // TODO: move this into a setup-jest.ts file +// cspell: disable + (global as any).CLIENT = true; import { TestGoban } from "../TestGoban";