Skip to content

haraka-test-fixtures 1.3.8

Install from the command line:
Learn more about npm packages
$ npm install @haraka/haraka-test-fixtures@1.3.8
Install via package.json:
"@haraka/haraka-test-fixtures": "1.3.8"

About this version

Build Status Code Coverage Code Climate

NPM

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.

Details


Assets

  • haraka-test-fixtures-1.3.8.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0