@nxus/tester
A test management framework for Nxus applications, built on Mocha and Chai
Last updated 4 years ago by mjreich .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nxus/tester 
SYNC missed versions from official npm registry.

@nxus/tester

Build Status

A test management framework for Nxus applications. The tester module provides some helper functions for funtionally testing a Nxus app.

Installation

> npm install @nxus/tester --save-dev

Configuration

In order to spin up the test server, add the following lines to your package.json scripts.

"pretest": "./node_modules/forever/bin/forever stopall && NODE_ENV=test PORT=3001 ./node_modules/forever/bin/forever start index.js && sleep 15"

"posttest": "./node_modules/forever/bin/forever stop index.js"

Usage

Running tests

> npm test

Requests

import {request} from '@nxus/tester'

request.get({url: '/'}, (err, res, body) => {
  res.statusCode.should.equal(200)
})

API


Current Tags

  • 2.4.0-1                                ...           latest (4 years ago)

3 Versions

  • 2.4.0-1                                ...           4 years ago
  • 2.4.0-0                                ...           4 years ago
  • 2.2.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |