haraka-test-fixtures v1.3.9
haraka-test-fixtures
Fixtures for testing Haraka and plugins
Usage
const fixtures = require('haraka-test-fixtures')A common pattern
beforeEach(() => {
this.plugin = new fixtures.plugin('pluginName')
this.connection = fixtures.connection.createConnection()
this.connection.init_transaction()
})
describe('pluginName', () => {
it('registers', () => {
this.plugin.register()
})
})Exports the following fixture types:
- 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.
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago