1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-09 11:14:29 +02:00
unleash.unleash/frontend/src/component/feature/CreateFeature/isFeatureLimitReached.test.ts

22 lines
887 B
TypeScript

import { isFeatureLimitReached } from './CreateFeature';
test('isFeatureLimitReached should return false when featureLimit is null', async () => {
expect(isFeatureLimitReached(null, 5)).toBe(false);
});
test('isFeatureLimitReached should return false when featureLimit is undefined', async () => {
expect(isFeatureLimitReached(undefined, 5)).toBe(false);
});
test('isFeatureLimitReached should return false when featureLimit is smaller current feature count', async () => {
expect(isFeatureLimitReached(6, 5)).toBe(false);
});
test('isFeatureLimitReached should return true when featureLimit is smaller current feature count', async () => {
expect(isFeatureLimitReached(4, 5)).toBe(true);
});
test('isFeatureLimitReached should return true when featureLimit is equal to current feature count', async () => {
expect(isFeatureLimitReached(5, 5)).toBe(true);
});