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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,10 +39,6 @@ export function orgSeatLimitReachedValidator(
|
||||
}
|
||||
|
||||
export function isDynamicSeatPlan(productTierType: ProductTierType): boolean {
|
||||
if (!productTierType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !isFixedSeatPlan(productTierType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user