1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 22:13:32 +00:00

Remove null and undefined checks

This commit is contained in:
Jimmy Vo
2024-12-17 11:37:00 -05:00
parent 007a665314
commit ee8845f637
2 changed files with 13 additions and 21 deletions

View File

@@ -172,27 +172,23 @@ describe("orgSeatLimitReachedValidator", () => {
describe("isFixedSeatPlan", () => {
test.each([
[ProductTierType.Free, true],
[ProductTierType.Families, true],
[ProductTierType.TeamsStarter, true],
[ProductTierType.Enterprise, false],
[null, false],
[undefined, false],
])("should return %s for %s", (input, expected) => {
expect(isFixedSeatPlan(input as ProductTierType)).toBe(expected);
[true, ProductTierType.Free],
[true, ProductTierType.Families],
[true, ProductTierType.TeamsStarter],
[false, ProductTierType.Enterprise],
])("should return %s for %s", (expected, input) => {
expect(isFixedSeatPlan(input)).toBe(expected);
});
});
describe("isDynamicSeatPlan", () => {
test.each([
[ProductTierType.Enterprise, true],
[ProductTierType.Teams, true],
[ProductTierType.Free, false],
[ProductTierType.Families, false],
[ProductTierType.TeamsStarter, false],
[null, false],
[undefined, false],
])("should return %s for %s", (input, expected) => {
expect(isDynamicSeatPlan(input as ProductTierType)).toBe(expected);
[true, ProductTierType.Enterprise],
[true, ProductTierType.Teams],
[false, ProductTierType.Free],
[false, ProductTierType.Families],
[false, ProductTierType.TeamsStarter],
])("should return %s for %s", (expected, input) => {
expect(isDynamicSeatPlan(input)).toBe(expected);
});
});

View File

@@ -39,10 +39,6 @@ export function orgSeatLimitReachedValidator(
}
export function isDynamicSeatPlan(productTierType: ProductTierType): boolean {
if (!productTierType) {
return false;
}
return !isFixedSeatPlan(productTierType);
}