Fix Flipper lints #9

Summary:
This introduces a few more lints in fact because I renamed the icon functions
to make clear that they use sync methods under the hood.

Reviewed By: timur-valiev

Differential Revision: D31964701

fbshipit-source-id: d0beb58b5b301f5428fdbfe8c65784df0d86eaad
This commit is contained in:
Pascal Hartig
2021-10-28 05:45:38 -07:00
committed by Facebook GitHub Bot
parent f8117240af
commit 2525a5efd4
12 changed files with 45 additions and 24 deletions

View File

@@ -7,7 +7,7 @@
* @format
*/
import {buildLocalIconPath, buildIconURL} from '../icons';
import {buildLocalIconPath, buildIconURLSync} from '../icons';
import * as path from 'path';
test('filled icons get correct local path', () => {
@@ -21,14 +21,14 @@ test('outline icons get correct local path', () => {
});
test('filled icons get correct URL', () => {
const iconUrl = buildIconURL('star', 12, 2);
const iconUrl = buildIconURLSync('star', 12, 2);
expect(iconUrl).toBe(
'https://facebook.com/assets/?name=star&variant=filled&size=12&set=facebook_icons&density=2x',
);
});
test('outline icons get correct URL', () => {
const iconUrl = buildIconURL('star-outline', 12, 2);
const iconUrl = buildIconURLSync('star-outline', 12, 2);
expect(iconUrl).toBe(
'https://facebook.com/assets/?name=star&variant=outline&size=12&set=facebook_icons&density=2x',
);