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();
module.exports = function(grunt) {
var server;
server = require('testacular').server;
return grunt.registerMultiTask('testacularServer', 'Starts up a testacular server.', function() {
var done, _base, _base1, _ref, _ref1;
done = this.async();
if ((_ref = (_base = this.data).options) == null) {
_base.options = {};
}
if ((_ref1 = (_base1 = this.data.options).keepalive) == null) {
_base1.keepalive = false;
}
if (this.data.configFile) {
this.data.configFile = grunt.template.process(this.data.configFile);
}
server.start(this.data, function(exitCode) {
if (exitCode > 0) {
return done(false);
}
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) {
grunt.registerTask('server', 'start testacular server', function () {
//Mark the task as async but never call done, so the server stays up
var done = this.async();
testacular.server.start({ configFile: 'test/test-config.js'});
});
grunt.registerTask('server', 'start testacular server', function () {
//Mark the task as async but never call done, so the server stays up
var done = this.async();
testacular.server.start({ configFile: 'test/test-config.js'});
});
grunt.registerTask('server', 'start testacular server', function () {
//Mark the task as async but never call done, so the server stays up
var done = this.async();
testacular.server.start({ configFile: 'test/test-config.js'});
});