Skip to content

Instantly share code, notes, and snippets.

@seancoyne
Created October 23, 2015 19:15
Show Gist options
  • Save seancoyne/2e1bf04595f854032062 to your computer and use it in GitHub Desktop.
Save seancoyne/2e1bf04595f854032062 to your computer and use it in GitHub Desktop.
example gulp setup for testbox-runner
/* 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