Skip to content

Commit

Permalink
Merge branch 'bundle-react' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
xd009642 committed Aug 25, 2020
2 parents 7db6eaa + 72301bf commit c5f9e10
Show file tree
Hide file tree
Showing 4 changed files with 278 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ debugging

### Changed
- Don't report coverage when not running tests
- Inline react scripts to HTML to allow rendering on more restrictive security
policies (issue #534)

### Removed

Expand Down
8 changes: 5 additions & 3 deletions src/report/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,17 @@ pub fn export(coverage_data: &TraceMap, config: &Config) -> Result<(), RunError>
var data = {};
var previousData = {};
</script>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin>{}</script>
<script crossorigin>{}</script>
<script>{}</script>
</body>
</html>"##,
include_str!("report_viewer.css"),
report_json,
previous_report_json,
include_str!("report_viewer.js")
include_str!("react.production.min.js"),
include_str!("react-dom.production.min.js"),
include_str!("report_viewer.js"),
) {
Ok(_) => (),
Err(e) => return Err(RunError::Html(e.to_string())),
Expand Down
Loading

0 comments on commit c5f9e10

Please sign in to comment.