Skip to content

Commit

Permalink
added one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Dec 19, 2024
1 parent 1fdc542 commit 8e8bfa0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/create-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
});
});

0 comments on commit 8e8bfa0

Please sign in to comment.