Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
grunt.registerMultiTask('testacularRun', 'Run tests on a testacular server. ', function() {
// Make async.
var done = this.async();
var options = this.options({});
// Run using testacular.runner
testacular.runner.run(options, function(code) {
done(code === 0);
});
});
};
module.exports = function(grunt) {
var path, runner, server, _;
server = require('testacular').server;
runner = require('testacular').runner;
path = require('path');
_ = grunt.utils._;
grunt.registerMultiTask('testacularServer', 'starts a testacular server', function() {
var done;
grunt.log.writeln("Options: " + (JSON.stringify(this.data)));
done = this.async();
return server.start(this.data, function(exitCode) {
if (exitCode > 0) {
return grunt.fail(exitCode);
}
});
});
return grunt.registerMultiTask('testacularRun', 'starts a testacular server', function() {
var done;
done = this.async();
return runner.run(this.data, function(exitCode) {