mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-06-01 10:06:17 +00:00
Updated to airbnb coding styles
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user