forked from boranton/testcafe-workshop
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 => {
|
module.exports = config => {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['mocha', 'chai'],
|
frameworks: ['mocha', 'chai'],
|
||||||
files: [
|
files: [fileGlob],
|
||||||
'src/**/*.test.js',
|
preprocessors: {
|
||||||
],
|
[fileGlob]: ['webpack']
|
||||||
|
},
|
||||||
|
webpack: webpackConfig,
|
||||||
|
webpackMiddleware: {noInfo: true},
|
||||||
reporters: ['progress'],
|
reporters: ['progress'],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
colors: true,
|
colors: true,
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
"karma-chai": "0.1.0",
|
"karma-chai": "0.1.0",
|
||||||
"karma-chrome-launcher": "1.0.1",
|
"karma-chrome-launcher": "1.0.1",
|
||||||
"karma-mocha": "1.1.1",
|
"karma-mocha": "1.1.1",
|
||||||
|
"karma-webpack": "1.7.0",
|
||||||
"mocha": "3.0.1",
|
"mocha": "3.0.1",
|
||||||
"npm-run-all": "2.3.0",
|
"npm-run-all": "2.3.0",
|
||||||
"opt-cli": "1.5.1",
|
"opt-cli": "1.5.1",
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
describe('test', () => {
|
var Controller = require('./controller')
|
||||||
it('works', () => {
|
|
||||||
expect(true).to.be.true
|
describe('controller', () => {
|
||||||
})
|
it('exists', () => {
|
||||||
it('works again', () => {
|
expect(Controller).to.exist
|
||||||
expect('hi').to.equal('hi')
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user