forked from boranton/testcafe-workshop
add webpack
This commit is contained in:
parent
2dbe46425a
commit
6babcb3348
@ -1,8 +1,17 @@
|
||||
const webpackEnv = {test: true}
|
||||
const webpackConfig = require('./webpack.config')(webpackEnv)
|
||||
const fileGlob = 'src/js/**/*.test.js'
|
||||
|
||||
module.exports = function setKarmaConfig(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['mocha', 'chai'],
|
||||
files: ['src/js/**/*.test.js'],
|
||||
files: [fileGlob],
|
||||
preprocessors: {
|
||||
[fileGlob]: ['webpack']
|
||||
},
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {noInfo: true},
|
||||
reporters: ['progress'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
"karma-chai": "0.1.0",
|
||||
"karma-chrome-launcher": "1.0.1",
|
||||
"karma-mocha": "1.0.1",
|
||||
"karma-webpack": "1.7.0",
|
||||
"mocha": "2.5.3",
|
||||
"npm-run-all": "1.8.0",
|
||||
"opt-cli": "1.4.2",
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
describe('test', () => {
|
||||
it('works', () => {
|
||||
expect(true).to.be.true
|
||||
})
|
||||
it('works again', () => {
|
||||
expect('hi').to.equal('hi')
|
||||
import Controller from './controller'
|
||||
|
||||
describe('controller', () => {
|
||||
it('exists', () => {
|
||||
expect(Controller).to.exist
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user