-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react-file-type-icons): return correct icon name for documentsFol…
…der (#25688) * fix(react-file-type-icons): return correct icon name for documentsFolder * add change file
- Loading branch information
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-file-type-icons-73c2ddb0-ff78-4e33-87a8-dafa7d543252.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "fix: return correct icon name for documentsFolder", | ||
"packageName": "@fluentui/react-file-type-icons", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/react-file-type-icons/src/getFileTypeIconProps.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { FileIconType } from './FileIconType'; | ||
import { FileTypeIconMap } from './FileTypeIconMap'; | ||
import { getFileTypeIconNameFromExtensionOrType } from './getFileTypeIconProps'; | ||
|
||
describe('return valid icon name', () => { | ||
it('returns an icon name in file type icon map', () => { | ||
for (const key of Object.keys(FileIconType)) { | ||
// Iterate through a TypeScript enum | ||
const value = FileIconType[(key as unknown) as FileIconType]; | ||
if (typeof value === 'number') { | ||
expect(FileTypeIconMap).toHaveProperty(getFileTypeIconNameFromExtensionOrType(undefined, value)); | ||
} | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters