Added new setting to determine default display mode for tags

This commit is contained in:
Alejandro Celaya
2021-09-25 08:20:56 +02:00
parent 01f6f11ee2
commit 1da7119c5c
9 changed files with 84 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import { determineOrderDir, nonEmptyValueOrNull, rangeOf } from '../../src/utils/utils';
import { capitalize, determineOrderDir, nonEmptyValueOrNull, rangeOf } from '../../src/utils/utils';
describe('utils', () => {
describe('determineOrderDir', () => {
@@ -60,4 +60,15 @@ describe('utils', () => {
expect(nonEmptyValueOrNull(value)).toEqual(expected);
});
});
describe('capitalize', () => {
it.each([
[ 'foo', 'Foo' ],
[ 'BAR', 'BAR' ],
[ 'bAZ', 'BAZ' ],
[ 'with spaces', 'With spaces' ],
])('sets first letter in uppercase', (value, expectedResult) => {
expect(capitalize(value)).toEqual(expectedResult);
});
});
});