Skip to content

Commit

Permalink
chore(karma): update testing rig
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Apr 26, 2016
1 parent e974615 commit 2ffc860
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
7 changes: 3 additions & 4 deletions build/karma.conf.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ module.exports = (karmaConfig) => {
singleRun: !argv.watch,
reporters: ['mocha'],
files: [
'./node_modules/babel-polyfill/dist/polyfill.js',
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
require.resolve('babel-polyfill/browser'),
'./test/tests.bundle.js',
],
frameworks: ['mocha'],
preprocessors: {
'**/*.bundle.js': ['webpack', 'sourcemap'],
'**/*.bundle.js': ['webpack'],
},
client: {
mocha: {
Expand All @@ -25,7 +24,7 @@ module.exports = (karmaConfig) => {
},
},
webpack: {
devtool: 'inline-source-map',
devtool: 'cheap-module-source-map',
module: {
...webpackConfig.module,
loaders: [
Expand Down
9 changes: 6 additions & 3 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ const webpackHotMiddlewareEntry = 'webpack-hot-middleware/client?' + _.map({
quiet: false, // Set to true to disable all console logging.
}, (val, key) => `&${key}=${val}`).join('')

const APP_ENTRY = paths.docsSrc('DocsApp.js')
const APP_ENTRY = [
require.resolve('babel-polyfill'),
paths.docsSrc('DocsApp.js'),
]

webpackConfig.entry = {
app: __DEV__
? [webpackHotMiddlewareEntry, APP_ENTRY]
: [APP_ENTRY],
? [webpackHotMiddlewareEntry, ...APP_ENTRY]
: [...APP_ENTRY],
vendor: [
webpackHotMiddlewareEntry,
'babel-polyfill',
Expand Down
21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"eslint-config-ta": "^4.1.0",
"eslint-loader": "^1.0.0",
"eslint-plugin-mocha": "^1.0.0",
"eslint-plugin-react": "^3.5.1",
"eslint-plugin-react": "^4.2.3",
"express": "^4.13.4",
"faker": "^3.0.1",
"file-loader": "^0.8.5",
Expand All @@ -80,20 +80,17 @@
"highlight.js": "8.9.1",
"html-webpack-plugin": "^2.14.0",
"imports-loader": "^0.6.4",
"json": "^9.0.3",
"json-loader": "^0.5.3",
"karma": "^0.13.13",
"karma-cli": "^0.1.1",
"karma-mocha": "^0.2.0",
"karma-mocha-reporter": "^1.1.1",
"karma-phantomjs-launcher": "^0.2.1",
"karma-sourcemap-loader": "^0.3.5",
"karma-webpack": "^1.7.0",
"karma": "^0.13.22",
"karma-cli": "^0.1.2",
"karma-mocha": "^0.2.2",
"karma-mocha-reporter": "^2.0.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-webpack-with-fast-source-maps": "^1.9.2",
"mocha": "^2.3.3",
"mocha-loader": "^0.7.1",
"node-sass": "^3.4.2",
"phantomjs": "^1.9.18",
"phantomjs-polyfill": "0.0.1",
"phantomjs-prebuilt": "^2.1.7",
"raw-loader": "^0.5.1",
"react": "^0.14.0",
"react-addons-create-fragment": "^0.14.8",
Expand All @@ -115,7 +112,7 @@
"ta-scripts": "^2.3.1",
"through2": "^2.0.0",
"watch": "^0.16.0",
"webpack": "^1.12.2",
"webpack": "^1.12.14",
"webpack-dev-middleware": "^1.5.1",
"webpack-hot-middleware": "^2.10.0",
"yargs": "^4.3.2"
Expand Down

0 comments on commit 2ffc860

Please sign in to comment.