Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var fixtures = require('haraka-test-fixtures');
var Connection = fixtures.connection;
var ResultStore = fixtures.result_store;
function _set_up(callback) {
this.connection = Connection.createConnection();
this.connection.results = new ResultStore(this.connection);
callback();
}
function _tear_down(callback) {
callback();
}
exports.default_result = {
setUp : _set_up,
tearDown : _tear_down,
'init add' : function (test) {
test.expect(1);
this.connection.results.add('test_plugin', { pass: 'test pass' });
'use strict';
var Address = require('address-rfc2821').Address;
var fixtures = require('haraka-test-fixtures');
var Connection = fixtures.connection;
var ResultStore = fixtures.result_store;
var stub = fixtures.stub.stub;
var _set_up = function (done) {
this.plugin = new fixtures.plugin('karma');
this.plugin.cfg = { main: {} };
this.plugin.deny_hooks = {'connect': true};
this.plugin.tarpit_hooks = ['connect'];
this.connection = Connection.createConnection({}, { notes: {} });
this.connection.transaction = stub;
this.connection.transaction.results = new ResultStore(this.plugin);
done();