Vercel/__tests__/category.test.ts
Sam Becker 7c9ce0d26c
Expand social networks (#308)
* Create utility for managing env var-based key lists

* Add expanded social content

* Finalize content for social networks additions

* Add social network config to README
2025-09-10 23:22:26 -05:00

38 lines
791 B
TypeScript

import {
DEFAULT_CATEGORY_KEYS,
parseOrderedCategoriesFromString,
} from '@/category';
describe('set', () => {
it('parses from string', () => {
expect(parseOrderedCategoriesFromString())
.toStrictEqual(DEFAULT_CATEGORY_KEYS);
expect(parseOrderedCategoriesFromString(
'cameras,recipes,tags,films,focal-lengths,lenses',
)).toStrictEqual([
'cameras',
'recipes',
'tags',
'films',
'focal-lengths',
'lenses',
]);
expect(parseOrderedCategoriesFromString(
'cameras, recipes, tags, films',
)).toStrictEqual([
'cameras',
'recipes',
'tags',
'films',
]);
expect(parseOrderedCategoriesFromString(
'cameras',
)).toStrictEqual([
'cameras',
]);
});
});