From b15746fb78b333313bbffe0804f1840341fdc861 Mon Sep 17 00:00:00 2001 From: Alex Mos Date: Fri, 19 Aug 2016 16:22:34 +0300 Subject: [PATCH] Update to qunit-harness v1.x. Bump version (closes #1) --- Gulpfile.js | 2 +- package.json | 4 ++-- src/index.js | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index 48b68ed..eeb2bc2 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -7,7 +7,7 @@ gulp.task('clean', function (cb) { del('lib', cb); }); -gulp.task('build', ['clean'], function () { +gulp.task('build', ['clean', 'lint'], function () { return gulp .src('src/**/*.js') .pipe(babel()) diff --git a/package.json b/package.json index e49e0db..b333607 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-qunit-harness", - "version": "0.1.14", + "version": "1.0.0", "description": "Gulp plugin for running qunit tests on a local machine and in the SauceLabs environment.", "homepage": "https://github.com/AlexanderMoskovkin/gulp-qunit-harness", "bugs": "https://github.com/AlexanderMoskovkin/gulp-qunit-harness/issues", @@ -20,7 +20,7 @@ "dependencies": { "babel-runtime": "^5.8.20", "promise": "^7.0.4", - "qunit-harness": "^0.3.0", + "qunit-harness": "^1.0.0", "through2": "^2.0.0" }, "devDependencies": { diff --git a/src/index.js b/src/index.js index b130309..9427306 100644 --- a/src/index.js +++ b/src/index.js @@ -19,7 +19,9 @@ export default function (qunitSettings, saucelabsSettings) { crossDomainPort: qunitSettings.crossDomainPort, scripts: qunitSettings.scripts || [], css: qunitSettings.css || [], - configApp: qunitSettings.configApp || null + configApp: qunitSettings.configApp || null, + before: qunitSettings.before, + after: qunitSettings.after }; var tests = []; @@ -41,6 +43,12 @@ export default function (qunitSettings, saucelabsSettings) { if (typeof qunitSettings.configApp === 'function') qunitHarness.configApp(qunitSettings.configApp); + if (typeof qunitSettings.before === 'function') + qunitHarness.before(qunitSettings.before); + + if (typeof qunitSettings.after === 'function') + qunitHarness.after(qunitSettings.after); + qunitHarness.create(); if (saucelabsSettings) {