Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
Update readme with query config instead of options
Browse files Browse the repository at this point in the history
  • Loading branch information
unimonkiez committed Feb 6, 2017
1 parent 45ed4ee commit d365e31
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ This file will be the only entry point for Karma:
#### karma.conf.js

```js
var babelPresets = ['es2015', 'stage-0', 'react'];

config.set({
files: [
Expand All @@ -67,19 +69,6 @@ config.set({
'test/index.js': 'webpack'
},
webpack: {
// *optional* babel options: isparta will use it as well as babel-loader
babel: {
presets: ['es2015', 'stage-0', 'react']
},
// *optional* isparta options: istanbul behind isparta will use it
isparta: {
embedSource: true,
noAutoWrap: true,
// these babel options will be passed only to isparta and not to babel-loader
babel: {
presets: ['es2015', 'stage-0', 'react']
}
},
module: {
preLoaders: [
Expand All @@ -90,13 +79,23 @@ config.set({
path.resolve('src/components/'),
path.resolve('node_modules/')
],
loader: 'babel'
loader: 'babel',
query: babelPresets
},
// transpile and instrument only testing sources with isparta
{
test: /\.js$/,
include: path.resolve('src/components/'),
loader: 'isparta'
loader: 'isparta',
// *optional* isparta options: istanbul behind isparta will use it
query: {
embedSource: true,
noAutoWrap: true,
// these babel options will be passed only to isparta and not to babel-loader
babel: {
presets: babelPresets
}
}
}
]
}
Expand Down

0 comments on commit d365e31

Please sign in to comment.