Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Add support to run tests in web workers #94

Merged
merged 5 commits into from
Jan 26, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<a name="9.3.4"></a>
## [9.3.4](https://github.com/dignifiedquire/aegir/compare/v9.3.3...v9.3.4) (2017-01-23)



<a name="9.3.3"></a>
## [9.3.3](https://github.com/dignifiedquire/aegir/compare/v9.3.2...v9.3.3) (2017-01-21)

Expand Down
2 changes: 2 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ require('../gulp')(gulp, ['test'])

if (args.browser) {
gulp.start('test:browser')
} else if (args.webworker) {
gulp.start('test:webworker')
} else if (args.node) {
gulp.start('test:node')
} else {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aegir",
"version": "9.3.3",
"version": "9.3.4",
"description": "JavaScript project management",
"main": "index.js",
"browser": {
Expand Down Expand Up @@ -62,6 +62,7 @@
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha-own-reporter": "^1.1.2",
"karma-mocha-webworker": "^1.3.0",
"karma-sauce-launcher": "^1.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.1",
Expand Down
10 changes: 9 additions & 1 deletion tasks/test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module.exports = (gulp) => {
const sauce = process.env.SAUCE_USERNAME && process.env.TRAVIS

new Server({
configFile: path.join(__dirname, '../../config/karma.conf.js'),
configFile: path.join(__dirname, webWorker
? '../../config/karma.webworker.conf.js'
: '../../config/karma.conf.js'),
singleRun: !debug
}, (code) => {
if (sauce) {
Expand All @@ -25,4 +27,10 @@ module.exports = (gulp) => {
gulp.task('test:browser', (done) => {
utils.hooksRun(gulp, 'test:browser', ['karma'], utils.exitOnFail(done))
})

let webWorker = false
gulp.task('test:webworker', (done) => {
webWorker = true
utils.hooksRun(gulp, 'test:browser', ['karma'], utils.exitOnFail(done))
})
}