Skip to content

Commit

Permalink
Restored default use of the Babel polyfill in Karma config
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed May 27, 2016
1 parent 47edc83 commit d52a857
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**Changed:**

- Restored default use of the Babel polyfill in Karma config so tests can assume a more-or-less ES2015 environment.

# 0.10.0 / 2016-05-16

**Breaking Changes:**
Expand Down
6 changes: 5 additions & 1 deletion src/createKarmaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default function({codeCoverage, singleRun}, userConfig) {
let {plugins, frameworks, reporters, extraLoaders} = getKarmaConfig({codeCoverage}, userConfig)
let testFiles = path.resolve(userKarma.tests || DEFAULT_TESTS)
let preprocessors = {
[require.resolve('babel-core/lib/polyfill')]: ['webpack'],
[testFiles]: ['webpack', 'sourcemap']
}

Expand Down Expand Up @@ -159,7 +160,10 @@ export default function({codeCoverage, singleRun}, userConfig) {
{type: 'lcovonly', subdir: '.'}
]
},
files: [testFiles],
files: [
require.resolve('babel-core/lib/polyfill'),
testFiles
],
frameworks,
mochaReporter: {
showDiff: true
Expand Down

0 comments on commit d52a857

Please sign in to comment.