apemantest
v4.0.4
Published
Test utilify for apeman.
Downloads
28
Readme
apemantest
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.