• 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

60.34
/src/plugins/generic/icon.js
1
'use strict';
2

3
var React = require('react'),
10!
4
        getIconClassName = require('../../getIconClassName'),
5
        fileTypes = require('./fileTypes.js');
2✔
6

2✔
7
var Icon = React.createClass({
2✔
8
        propTypes: {
9
                mimeType: React.PropTypes.string
2✔
10
        },
11
        contextTypes: {
12
                getIntlMessage: React.PropTypes.func
13
        },
14
        getImageAltText: function() {
15
                var fileTypeName = fileTypes[this.props.mimeType];
16
                fileTypeName = (fileTypeName) ? 'Plugins.Generic.FileType.' +  fileTypeName : 'Plugins.Generic.FileType.Unknown';
17

8✔
18
                return this.context.getIntlMessage(fileTypeName);
8✔
19
        },
20
        render: function() {
8✔
21
                var className = 'vui-fileviewer-icon vui-fileviewer-icon-' + getIconClassName(this.props.mimeType);
22
                return (
23
                        <span className={className}><span className="offscreen">{this.getImageAltText()}</span></span>
8✔
24
                );
8✔
25
        }
26
});
27

28
module.exports = Icon;
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

© 2025 Coveralls, Inc