fix: handle array package features
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildPackageComparisonRows, classifyPackageChange, selectRecommendedPackageId } from '../lib/packageShop';
|
||||
import {
|
||||
buildPackageComparisonRows,
|
||||
classifyPackageChange,
|
||||
getEnabledPackageFeatures,
|
||||
selectRecommendedPackageId,
|
||||
} from '../lib/packageShop';
|
||||
|
||||
describe('classifyPackageChange', () => {
|
||||
const active = {
|
||||
@@ -65,3 +70,9 @@ describe('buildPackageComparisonRows', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getEnabledPackageFeatures', () => {
|
||||
it('accepts array payloads', () => {
|
||||
expect(getEnabledPackageFeatures({ features: ['custom_branding', ''] } as any)).toEqual(['custom_branding']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user