* 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
38 lines
791 B
TypeScript
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',
|
|
]);
|
|
});
|
|
});
|