From 8866976bb42f146f71e9e0918f91f6fb0efdbab3 Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Tue, 14 Sep 2021 12:28:33 -0400 Subject: [PATCH] fixed hasFlag test (#1076) Co-authored-by: Asier Isayas --- src/Platform/Hosted/extractFeatures.test.ts | 5 +++-- src/Platform/Hosted/extractFeatures.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Platform/Hosted/extractFeatures.test.ts b/src/Platform/Hosted/extractFeatures.test.ts index ac2e7afae..98fc8ebd7 100644 --- a/src/Platform/Hosted/extractFeatures.test.ts +++ b/src/Platform/Hosted/extractFeatures.test.ts @@ -31,7 +31,8 @@ describe("hasFlag", () => { expect(hasFlag(singleFlagValue, desiredFlag)).toBe(true); expect(hasFlag(multipleFlagValues, desiredFlag)).toBe(true); expect(hasFlag(differentFlagValue, desiredFlag)).toBe(false); - expect(hasFlag(multipleFlagValues, undefined)).toBe(false); - expect(hasFlag(undefined, desiredFlag)).toBe(false); + expect(hasFlag(multipleFlagValues, undefined as unknown as string)).toBe(false); + expect(hasFlag(undefined as unknown as string, desiredFlag)).toBe(false); + expect(hasFlag(undefined as unknown as string, undefined as unknown as string)).toBe(false); }); }); diff --git a/src/Platform/Hosted/extractFeatures.ts b/src/Platform/Hosted/extractFeatures.ts index 130991301..1313aa834 100644 --- a/src/Platform/Hosted/extractFeatures.ts +++ b/src/Platform/Hosted/extractFeatures.ts @@ -29,8 +29,8 @@ export type Features = { readonly pr?: string; readonly showMinRUSurvey: boolean; readonly ttl90Days: boolean; - readonly mongoProxyEndpoint: string; - readonly mongoProxyAPIs: string; + readonly mongoProxyEndpoint?: string; + readonly mongoProxyAPIs?: string; readonly notebooksTemporarilyDown: boolean; };