Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
// var Address = require('address-rfc2821');
const fixtures = require('haraka-test-fixtures');
const Connection = fixtures.connection;
const Transaction = fixtures.transaction;
const _set_up = function (done) {
this.plugin = new fixtures.plugin('rspamd');
this.plugin.register();
this.connection = Connection.createConnection();
this.connection.transaction = Transaction.createTransaction();
done();
};
exports.register = {
setUp : _set_up,
'loads the rspamd plugin': function (test) {
test.expect(1);
test.equal('rspamd', this.plugin.name);
const _set_up = function (done) {
this.plugin = new fixtures.plugin('spf');
this.plugin.timeout = 8000;
this.plugin.load_spf_ini();
// uncomment this line to see detailed SPF evaluation
this.plugin.SPF.prototype.log_debug = () => {};
this.connection = fixtures.connection.createConnection();
this.connection.transaction = fixtures.transaction.createTransaction();
this.connection.transaction.results = new fixtures.results(this.connection);
done();
}
function _setup (done) {
this.plugin = new fixtures.plugin('queue/smtp_forward');
// switch config directory to 'tests/config'
this.plugin.config = this.plugin.config.module_config(path.resolve('tests'));
this.plugin.register();
this.connection = new fixtures.connection.createConnection();
this.connection.transaction = new fixtures.transaction.createTransaction();
done();
}
var _set_up_file = function (done) {
this.server = {};
this.plugin = new fixtures.plugin('rcpt_to.routes');
this.plugin.register();
this.connection = fixtures.connection.createConnection();
this.connection.transaction = fixtures.transaction.createTransaction();
this.connection.transaction.results = new fixtures.results(this.connection);
done();
};