-
-
Save cristoferdomingues/914b7eec4d28d4115581e63db7ee1941 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