Updated to airbnb coding styles

This commit is contained in:
Alejandro Celaya
2022-03-26 12:17:42 +01:00
parent 4e9b19afd1
commit a2df486280
239 changed files with 2210 additions and 3549 deletions

View File

@@ -28,11 +28,11 @@ describe('utils', () => {
describe('nonEmptyValueOrNull', () => {
it.each([
[ '', null ],
[ 'Hello', 'Hello' ],
[[], null ],
[[ 1, 2, 3 ], [ 1, 2, 3 ]],
[{}, null ],
['', null],
['Hello', 'Hello'],
[[], null],
[[1, 2, 3], [1, 2, 3]],
[{}, null],
[{ foo: 'bar' }, { foo: 'bar' }],
])('returns expected value based on input', (value, expected) => {
expect(nonEmptyValueOrNull(value)).toEqual(expected);
@@ -41,10 +41,10 @@ describe('utils', () => {
describe('capitalize', () => {
it.each([
[ 'foo', 'Foo' ],
[ 'BAR', 'BAR' ],
[ 'bAZ', 'BAZ' ],
[ 'with spaces', 'With spaces' ],
['foo', 'Foo'],
['BAR', 'BAR'],
['bAZ', 'BAZ'],
['with spaces', 'With spaces'],
])('sets first letter in uppercase', (value, expectedResult) => {
expect(capitalize(value)).toEqual(expectedResult);
});