add webpack
This commit is contained in:
parent
e7ed7b640f
commit
52495e81f8
@ -1,10 +1,17 @@
|
||||
const webpackEnv = {test: true}
|
||||
const webpackConfig = require('./webpack.config.babel')(webpackEnv)
|
||||
const fileGlob = 'src/**/*.test.js'
|
||||
|
||||
module.exports = config => {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['mocha', 'chai'],
|
||||
files: [
|
||||
'src/**/*.test.js',
|
||||
],
|
||||
files: [fileGlob],
|
||||
preprocessors: {
|
||||
[fileGlob]: ['webpack']
|
||||
},
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {noInfo: true},
|
||||
reporters: ['progress'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
"karma-chai": "0.1.0",
|
||||
"karma-chrome-launcher": "1.0.1",
|
||||
"karma-mocha": "1.1.1",
|
||||
"karma-webpack": "1.7.0",
|
||||
"mocha": "3.0.1",
|
||||
"npm-run-all": "2.3.0",
|
||||
"opt-cli": "1.5.1",
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
describe('test', () => {
|
||||
it('works', () => {
|
||||
expect(true).to.be.true
|
||||
})
|
||||
it('works again', () => {
|
||||
expect('hi').to.equal('hi')
|
||||
var Controller = require('./controller')
|
||||
|
||||
describe('controller', () => {
|
||||
it('exists', () => {
|
||||
expect(Controller).to.exist
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user