From 1682c21e64584b1d494e5200f74041796855b4f1 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Fri, 29 Nov 2024 14:27:48 +0100 Subject: [PATCH] added one more test --- src/lib/create-config.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/create-config.test.ts b/src/lib/create-config.test.ts index 06646635e2a1..940eedd1e37b 100644 --- a/src/lib/create-config.test.ts +++ b/src/lib/create-config.test.ts @@ -503,6 +503,10 @@ describe('isOSS', () => { test('Config with pro environment should set isOss to false regardless of pro casing', async () => { const isOss = resolveIsOss(false, false, 'Pro'); expect(isOss).toBe(false); + const lowerCase = resolveIsOss(false, false, 'pro'); + expect(lowerCase).toBe(false); + const strangeCase = resolveIsOss(false, false, 'PrO'); + expect(strangeCase).toBe(false); }); test('Config with enterpriseVersion set should set isOss to false', async () => { const isOss = resolveIsOss(true, false, 'Enterprise'); @@ -516,4 +520,14 @@ describe('isOSS', () => { const isOss = resolveIsOss(false, false, 'my environment', true); expect(isOss).toBe(false); }); + test('Config with isOss option set to true should return true when test environment is active', async () => { + let isOss = resolveIsOss(false, true, 'Pro', true); + expect(isOss).toBe(true); + + isOss = resolveIsOss(true, true, 'Pro', true); + expect(isOss).toBe(true); + + isOss = resolveIsOss(false, true, 'some environment', true); + expect(isOss).toBe(true); + }); });