Skip to content

A helper package for writing tests that interact with Wildduck at some way

License

Notifications You must be signed in to change notification settings

kurbar/wildduck-test-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wildduck test server as a package

This is a helper package for writing tests that interact with the Wildduck API or other parts in some way. It exposes a test server script via the vendor/node_modules bin directory to easily link it with your NPM or Compose flows.

Installation

Note: Currently only supported on Mac and Linux. Windows support is coming.

For Mac users

This package relies on readlink -f but Mac's default installed readlink does not support the -f option. Hence, coreutils should be installed. Can be installed via MacPorts or Homebrew (brew install coreutils).

Via NPM:

npm install --save-dev wildduck-test-server

Via Composer:

composer require --dev kurbar/wildduck-test-server

Usage

It can be used in different ways.

  1. As a standalone script NPM:
node_modules/bin/wildduck-test-server start|stop

Composer:

vendor/bin/wildduck-test-server start|stop
  1. Or tied into your package.json/composer.json flow NPM:
{
  "scripts": {
    "test:wd": "wildduck-test-server start && npm test && wildduck-test-server stop"
  }
}

Composer (Note: it is recommended to disable process timeout since on first start it might take a while and Composer will time out executing):

{
  "scripts": {
    "test": [
      "Composer\\Config::disableProcessTimeout",
      "wildduck-test-server start",
      "phpunit tests/",
      "wildduck-test-server stop"
    ]
  }
}

About

A helper package for writing tests that interact with Wildduck at some way

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages