Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ env:
# end: these are required for building on node.js v4

before_script:
- npm install -g grunt-cli

script:
- npm run lint
Expand Down
49 changes: 0 additions & 49 deletions Gruntfile.js

This file was deleted.

11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,9 @@
"vs-stun" : "~0.0.7"
},
"devDependencies": {
"nodeunit" : "https://github.com/godsflaw/nodeunit/archive/master.tar.gz",
"nodeunit" : "*",
"haraka-test-fixtures" : "*",
"eslint" : ">=2.0.0",
"grunt" : "*",
"grunt-contrib-clean" : "*",
"grunt-contrib-jshint" : "*",
"grunt-version-check" : "*",
"grunt-eslint" : "*"
"eslint" : ">=2"
},
"bugs": {
"mail": "helpme@gmail.com",
Expand All @@ -68,7 +63,7 @@
},
"scripts": {
"test": "node run_tests",
"lint": "grunt lint",
"lint": "./node_modules/.bin/eslint *.js plugins/**/*.js bin/haraka bin/spf bin/dkimverify tests/**/*.js",
"cover": "NODE_ENV=cov ./node_modules/.bin/istanbul cov run_tests"
}
}
56 changes: 28 additions & 28 deletions tests/plugins/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ exports.aliases = {
setUp : _set_up,
'should have register function' : function (test) {
test.expect(2);
test.isNotNull(this.plugin);
test.isFunction(this.plugin.register);
test.ok(this.plugin);
test.equal('function', typeof this.plugin.register);
test.done();
},
'register function should inherit from queue/discard' : function (test) {
Expand All @@ -78,14 +78,14 @@ exports.aliases = {
'register_hook() should register available function' : function (test) {
test.expect(3);
test.equals(this.plugin.register_hook.args[1], 'aliases');
test.isNotNull(this.plugin.aliases);
test.isFunction(this.plugin.aliases);
test.ok(this.plugin.aliases);
test.equal('function', typeof this.plugin.aliases);
test.done();
},
'aliases hook always returns next()' : function (test) {
var next = function (action) {
test.expect(1);
test.isUndefined(action);
test.equals(undefined, action);
test.done();
};

Expand Down Expand Up @@ -121,9 +121,9 @@ exports.aliases = {

var next = function (action) {
test.expect(4);
test.isUndefined(this.connection.transaction.notes.discard);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.equals(undefined, this.connection.transaction.notes.discard);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -138,8 +138,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -154,8 +154,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -170,8 +170,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -186,8 +186,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -202,8 +202,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand Down Expand Up @@ -242,8 +242,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -258,8 +258,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -274,8 +274,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to.pop(), result);
test.done();
}.bind(this);
Expand All @@ -290,8 +290,8 @@ exports.aliases = {

var next = function (action) {
test.expect(3);
test.isNotNull(this.connection.transaction.rcpt_to);
test.isArray(this.connection.transaction.rcpt_to);
test.ok(this.connection.transaction.rcpt_to);
test.ok(Array.isArray(this.connection.transaction.rcpt_to));
test.deepEqual(this.connection.transaction.rcpt_to, result);
test.done();
}.bind(this);
Expand All @@ -307,7 +307,7 @@ exports.aliases = {

var next = function (action) {
test.expect(1);
test.isUndefined(this.connection.transaction.notes.discard);
test.equals(undefined, this.connection.transaction.notes.discard);
test.done();
}.bind(this);

Expand All @@ -322,7 +322,7 @@ exports.aliases = {

var next = function (action) {
test.expect(1);
test.isUndefined(this.connection.transaction.notes.discard);
test.equals(undefined, this.connection.transaction.notes.discard);
test.done();
}.bind(this);

Expand Down
4 changes: 2 additions & 2 deletions tests/plugins/log.elasticsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ exports.register = {
setUp : _set_up,
'has a register function' : function (test) {
test.expect(2);
test.isNotNull(this.plugin);
test.isFunction(this.plugin.register);
test.ok(this.plugin);
test.equal('function', typeof this.plugin.register);
test.done();
},
/*
Expand Down
8 changes: 4 additions & 4 deletions tests/plugins/relay.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ exports.plugin = {
setUp : _set_up,
'should have register function' : function (test) {
test.expect(2);
test.isNotNull(this.plugin);
test.isFunction(this.plugin.register);
test.ok(this.plugin);
test.equal('function', typeof this.plugin.register);
test.done();
},
'register function should call register_hook()' : function (test) {
Expand Down Expand Up @@ -295,8 +295,8 @@ exports.all = {
setUp : _set_up,
'register_hook() should register available function' : function (test) {
test.expect(3);
test.isNotNull(this.plugin.all);
test.isFunction(this.plugin.all);
test.ok(this.plugin.all);
test.equal('function', typeof this.plugin.all);
this.plugin.register();
this.plugin.cfg.relay.all = true;
this.plugin.register_hook('rcpt', 'all'); // register() doesn't b/c config is disabled
Expand Down
12 changes: 6 additions & 6 deletions tests/plugins/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ exports.plugin = {
setUp : _set_up,
'should have function register' : function (test) {
test.expect(2);
test.isNotNull(this.plugin);
test.isFunction(this.plugin.register);
test.ok(this.plugin);
test.equal('function', typeof this.plugin.register);
test.done();
},
'should have function load_tls_ini' : function (test) {
test.expect(1);
test.isFunction(this.plugin.load_tls_ini);
test.equal('function', typeof this.plugin.load_tls_ini);
test.done();
},
'should have function upgrade_connection' : function (test) {
test.expect(1);
test.isFunction(this.plugin.upgrade_connection);
test.equal('function', typeof this.plugin.upgrade_connection);
test.done();
},
'should have function advertise_starttls' : function (test) {
test.expect(1);
test.isFunction(this.plugin.advertise_starttls);
test.equal('function', typeof this.plugin.advertise_starttls);
test.done();
},
'should have function emit_upgrade_msg' : function (test) {
test.expect(1);
test.isFunction(this.plugin.emit_upgrade_msg);
test.equal('function', typeof this.plugin.emit_upgrade_msg);
test.done();
},
};
Expand Down