• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Brightspace / react-valence-ui-fileviewer / 7111280825

06 Dec 2023 07:04AM UTC coverage: 56.35% (-32.8%) from 89.198%
7111280825

push

github

web-flow
Merge pull request #114 from Brightspace/venkata/node-sass-update-2

adding npm i in release.yml

604 of 1444 branches covered (0.0%)

1624 of 2882 relevant lines covered (56.35%)

11.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

51.79
/src/getIconClassName.js
1
'use strict';
2

3
var iconExtensionMap = {
2!
4
        'application/pdf': 'pdf',
5
        'application/msword': 'document',
2✔
6
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'document',
7
        'application/vnd.ms-powerpoint': 'presentation',
8
        'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'presentation',
9
        'application/vnd.ms-excel': 'spreadsheet',
10
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'spreadsheet',
11
        'application/x-shockwave-flash': 'flash',
12
        'text/xml': 'xml',
13
        'application/zip': 'zip',
14
        'audio/': 'audio',
15
        'image/': 'image',
16
        'text/': 'text',
17
        'video/': 'video'
18
};
19

20
function getIconClassName(mimeType) {
21
        if (!mimeType) {
22
                return 'unknown';
23
        }
36!
24

×
25
        for (var pattern in iconExtensionMap) {
26
                if (mimeType.indexOf(pattern) === 0) {
27
                        return iconExtensionMap[pattern];
36✔
28
                }
312✔
29
        }
34✔
30
        return 'unknown';
31
}
32

2✔
33
module.exports = getIconClassName;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc