remove density mentions
Summary: removing dead code Reviewed By: lblasa Differential Revision: D50495989 fbshipit-source-id: 769f853b50bf6ec48705dbcec03977ec6a5bffa3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a978c96987
commit
fd774a2d52
@@ -19,7 +19,6 @@ test('filled icons get correct local path', () => {
|
||||
name: 'star',
|
||||
variant: 'filled',
|
||||
size: 12,
|
||||
density: 2,
|
||||
});
|
||||
expect(iconPath).toBe(path.join('icons', 'star-filled_d.png'));
|
||||
});
|
||||
@@ -29,7 +28,6 @@ test('outline icons get correct local path', () => {
|
||||
name: 'star',
|
||||
variant: 'outline',
|
||||
size: 12,
|
||||
density: 2,
|
||||
});
|
||||
expect(iconPath).toBe(path.join('icons', 'star-outline_d.png'));
|
||||
});
|
||||
@@ -39,11 +37,10 @@ test('filled icons get correct URL', async () => {
|
||||
name: 'star',
|
||||
variant: 'filled',
|
||||
size: 12,
|
||||
density: 2,
|
||||
} as const;
|
||||
const iconUrl = getPublicIconUrl(icon);
|
||||
expect(iconUrl).toBe(
|
||||
'https://facebook.com/images/assets_DO_NOT_HARDCODE/facebook_icons/star_filled_12.png', // TODO: support density?
|
||||
'https://facebook.com/images/assets_DO_NOT_HARDCODE/facebook_icons/star_filled_12.png',
|
||||
);
|
||||
const staticPath = getRenderHostInstance().serverConfig.paths.staticPath;
|
||||
const localUrl = getLocalIconUrl(icon, iconUrl, staticPath, false);
|
||||
|
||||
@@ -65,7 +65,7 @@ function tryRegisterIcon(icon: Icon, url: string, staticPath: string) {
|
||||
if (res.status !== 200) {
|
||||
throw new Error(
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
`Trying to use icon '${entryName}' with size ${size} and density ${icon.density}, however the icon doesn't seem to exists at ${url}: ${res.status}`,
|
||||
`Trying to use icon '${entryName}' with size ${size}, however the icon doesn't seem to exists at ${url}: ${res.status}`,
|
||||
);
|
||||
}
|
||||
if (!existing.includes(size)) {
|
||||
|
||||
Reference in New Issue
Block a user