Skip to content

Commit

Permalink
Use babel 6 and move where babel-polyfills are added.
Browse files Browse the repository at this point in the history
Babel 7 is still pending official release and causes some issues.  Babel
7.0.0-rc.2 throws errors where 7.0.0-rc.1 does not.  Rather than figure
out what causes these, I recommend we wait until it is officially
released.  The main benefit of Babel 7 is that the polyfills can be
added conditionally based on actual use.

When adding babel-polyfill to src/index.js, the coverage for index.js is
wrong (the line numbers are incorrect).  Further, babel-polyfill is
fairly heavy, so just add it to the vendor.js (geo.js not geo.lean.js).
It also needs to be added to the test-utils to ensure that we can use
new language features in the tests with PhantomJS.

For the coverage reporters, disable the html reporter as it fails with
karma-coverage and babel.  One solution would be to switch to
karma-coverage-istanbul-reporter, but I don't think the html coverage is
strictly necessary as we use codecov.
  • Loading branch information
manthey committed Aug 22, 2018
1 parent a722546 commit 9e1017b
Show file tree
Hide file tree
Showing 6 changed files with 1,435 additions and 2,586 deletions.
4 changes: 2 additions & 2 deletions karma-cov.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ module.exports = function (config) {
karma_config.specReporter = {suppressPassed: true, suppressSkipped: true};
karma_config.coverageReporter = {
reporters: [
{type: 'html', dir: 'dist/coverage/', subdir: subdir_name},
// {type: 'html', dir: 'dist/coverage/', subdir: subdir_name},
{type: 'cobertura', dir: 'dist/cobertura/', file: 'coverage.xml', subdir: subdir_name},
{type: 'json', dir: 'dist/coverage/json/', subdir: subdir_name},
{type: 'lcovonly', dir: 'lcov', subdir: subdir_name},
{type: 'lcovonly', dir: 'dist/coverage/lcov', subdir: subdir_name},
{type: 'text'}
]
};
Expand Down
Loading

0 comments on commit 9e1017b

Please sign in to comment.