From 6c5c2c88bc2b59651bc0b7de1259df8e0d167f1b Mon Sep 17 00:00:00 2001 From: Pokey Rule Date: Thu, 2 Dec 2021 20:45:05 +0000 Subject: [PATCH] Normalize hat enablement during testing --- src/core/Decorations.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/Decorations.ts b/src/core/Decorations.ts index c2896042ee..0513008e12 100644 --- a/src/core/Decorations.ts +++ b/src/core/Decorations.ts @@ -20,6 +20,7 @@ import { DEFAULT_VERTICAL_OFFSET_EM, } from "./shapeAdjustments"; import { Graph } from "../typings/Types"; +import isTesting from "../testUtil/isTesting"; export type DecorationMap = { [k in HatStyleName]?: vscode.TextEditorDecorationType; @@ -190,9 +191,9 @@ export default class Decorations { shapePenalties.default = 0; colorPenalties.default = 0; - const activeHatColors = HAT_COLORS.filter( - (color) => colorEnablement[color] - ); + const activeHatColors = isTesting() + ? HAT_COLORS + : HAT_COLORS.filter((color) => colorEnablement[color]); const activeNonDefaultHatShapes = HAT_NON_DEFAULT_SHAPES.filter( (shape) => shapeEnablement[shape] );