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

@@ -25,10 +25,10 @@ describe('ordering', () => {
describe('orderToString', () => {
it.each([
[{}, undefined ],
[{ field: 'foo' }, undefined ],
[{ field: 'foo', dir: 'ASC' as OrderDir }, 'foo-ASC' ],
[{ field: 'bar', dir: 'DESC' as OrderDir }, 'bar-DESC' ],
[{}, undefined],
[{ field: 'foo' }, undefined],
[{ field: 'foo', dir: 'ASC' as OrderDir }, 'foo-ASC'],
[{ field: 'bar', dir: 'DESC' as OrderDir }, 'bar-DESC'],
])('casts the order to string', (order, expectedResult) => {
expect(orderToString(order)).toEqual(expectedResult);
});
@@ -36,8 +36,8 @@ describe('ordering', () => {
describe('stringToOrder', () => {
it.each([
[ 'foo-ASC', { field: 'foo', dir: 'ASC' }],
[ 'bar-DESC', { field: 'bar', dir: 'DESC' }],
['foo-ASC', { field: 'foo', dir: 'ASC' }],
['bar-DESC', { field: 'bar', dir: 'DESC' }],
])('casts a string to an order objects', (order, expectedResult) => {
expect(stringToOrder(order)).toEqual(expectedResult);
});