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

@@ -48,11 +48,11 @@ describe('ColorGenerator', () => {
describe('isColorLightForKey', () => {
it.each([
[ MAIN_COLOR, true ],
[ '#8A661C', false ],
[ '#F7BE05', true ],
[ '#5A02D8', false ],
[ '#202786', false ],
[MAIN_COLOR, true],
['#8A661C', false],
['#F7BE05', true],
['#5A02D8', false],
['#202786', false],
])('returns that the color for a key is light based on the color assigned to that key', (color, isLight) => {
colorGenerator.setColorForKey('foo', color);

View File

@@ -2,7 +2,7 @@ import { Mock } from 'ts-mockery';
import LocalStorage from '../../../src/utils/services/LocalStorage';
describe('LocalStorage', () => {
const getItem = jest.fn((key) => key === 'shlink.foo' ? JSON.stringify({ foo: 'bar' }) : null);
const getItem = jest.fn((key) => (key === 'shlink.foo' ? JSON.stringify({ foo: 'bar' }) : null));
const setItem = jest.fn();
const localStorageMock = Mock.of<Storage>({ getItem, setItem });
let storage: LocalStorage;