apemantest

4.0.4 • Public • Published

apemantest

Build Status Code Climate Code Coverage npm Version JS Standard

Test utilify for apeman.

Installation

$ npm install apemantest --save-dev

Usage

/**
 * Test case for signRoute.
 * Runs with mocha.
 */
 
'use strict'
 
const apemantest = require('apemantest')
const request = apemantest.newRequest()
const { assert, co } = apemantest
 
describe('sign-route', function suite () {
  this.timeout(4000)
 
  let server = apemantest.testServer('api', {
    configuration: require('../Apemanfile.js')
  })
  before(() => co(function * () {
    yield apemantest.resetDB()
    yield server.start()
  }))
 
  after(() => co(function * () {
    yield server.stop()
  }))
 
  it('API Test', () => co(function * () {
    let res = yield request({
      url: `${server.baseUrl}/sign/signup`,
      method: 'POST',
      form: { /* ... */ }
    })
    /* ... */
  }))
})
 
/* global describe, before, after, it */
 

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i apemantest

Weekly Downloads

4

Version

4.0.4

License

MIT

Last publish

Collaborators

  • okunishinishi