Created
October 23, 2015 19:15
-
-
Save seancoyne/2e1bf04595f854032062 to your computer and use it in GitHub Desktop.
example gulp setup for testbox-runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint node: true */ | |
(function(){ | |
"use strict"; | |
var gulp = require("gulp"); | |
gulp.task("testbox", function(done){ | |
// NOTE: this example assumes you have a .testbox-runnerrc file holding your config settings | |
var rc = require("rc"); | |
var testboxRunner = require("testbox-runner/lib/runner.js"); | |
var testboxReporter = require("testbox-runner/lib/reporter.js"); | |
testboxRunner(rc("testbox-runner", {}), function(uri){ | |
console.log("Running tests via URL: " + uri); | |
}, function(err, results){ | |
if (err) { | |
console.error(err); | |
} else { | |
testboxReporter(results); | |
} | |
done(); | |
}); | |
}); | |
gulp.task("watch", [ ], function() { | |
// cfml | |
gulp.watch([ "./api/model/**/*.cfc", "./api/tests/spec/**/*.cfc" ], [ "testbox" ]); | |
}); | |
gulp.task("default", [ "watch" ]); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment