Fixtures for testing Haraka and plugins
const fixtures = require('haraka-test-fixtures')
beforeEach(() => {
this.plugin = new fixtures.plugin('pluginName')
this.connection = fixtures.connection.createConnection()
this.connection.init_transaction()
})
describe('pluginName', () => {
it('registers', () => {
this.plugin.register()
})
})
- connection
- line_socket
- logger
- plugin
- results
- stub
- transaction
- util_hmailitem
These fixtures are analogs of their like-named siblings in Haraka with varying levels of completeness. If there are functions necessary to enhance your ability to test, please do add them.