Skip to content

Commit

Permalink
Idea of having a central file for webpacking the tests
Browse files Browse the repository at this point in the history
One issue is that it doesn't work when AEgir is `npm link`ed.
  • Loading branch information
vmx committed Mar 2, 2018
1 parent 57c9554 commit f7457f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/config/karma-webpack-bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This is webpack specific. It will create a single bundle
// out of all files ending in ".spec.js" within the "test"
// directory and all its subdirectories.
'use strict'
const testsContext = require.context('../../../../test', true, /\.spec\.js/)
testsContext.keys().forEach(testsContext)
5 changes: 4 additions & 1 deletion src/test/browser-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function getPatterns (ctx) {

return [
'test/browser.js',
'test/**/*.spec.js'
'node_modules/aegir/src/config/karma-webpack-bundle.js'
]
}

Expand Down Expand Up @@ -76,6 +76,9 @@ function getConfig (isWebworker, ctx) {
junitReporter: {
outputFile: isWebworker ? 'junit-report-webworker.xml' : 'junit-report-browser.xml'
},
preprocessors: {
'node_modules/aegir/src/config/karma-webpack-bundle.js': ['webpack']
},
browserNoActivityTimeout: 50 * 1000,
customLaunchers: {
ChromeCustom: {
Expand Down

0 comments on commit f7457f4

Please sign in to comment.