Created
April 29, 2016 19:28
-
-
Save sagalbot/a23ebf15c68d15842e96df038fbc42ce to your computer and use it in GitHub Desktop.
Karma Config for Webpack/Vue/Jasmine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (config) { | |
config.set({ | |
browsers: ['PhantomJS'], | |
frameworks: ['jasmine'], | |
files: ['test/**/*.js'], | |
reporters: ['spec'], | |
preprocessors: { | |
'test/*.js': ['webpack'] | |
}, | |
singleRun: true, | |
webpack: { | |
// karma watches the test entry points | |
// (you don't need to specify the entry option) | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loader: 'babel', | |
exclude: /node_modules/ | |
}, | |
{ | |
test: /\.vue$/, | |
loader: 'vue' | |
} | |
] | |
} | |
}, | |
webpackMiddleware: { | |
noInfo: true | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment