public/report/test-route.html
<section class="suite">
<h1>TFTFT Route Test with Supertest</h1>
<dl>
<section class="suite">
<h1>routes for static files</h1>
<dl>
[0mGET /report/test-unit.html [32m200 [0m6.374 ms - 378[0m
<dt>Unit test mocha html report</dt>
<dd><pre><code>request(app)
.get('/report/test-unit.html')
.expect(200, done);</code></pre></dd>
[0mGET /report/test-route.html [32m200 [0m1.325 ms - 401[0m
<dt>Route test mocha html report</dt>
<dd><pre><code>request(app)
.get('/report/test-route.html')
.expect(200, done);</code></pre></dd>
[0mGET /report/test-spec.html [32m200 [0m1.269 ms - 219[0m
<dt>End to End test mocha html report</dt>
<dd><pre><code>request(app)
.get('/report/test-spec.html')
.expect(200, done);</code></pre></dd>
[0mGET /cov/lcov-report/index.html [32m200 [0m1.068 ms - 4163[0m
<dt>Coverage test istanbul html report</dt>
<dd><pre><code>request(app)
.get('/cov/lcov-report/index.html')
.expect(200, done);</code></pre></dd>
[0mGET /images/misterdevo.svg [32m200 [0m1.342 ms - 42194[0m
<dt>End to End saucelabs matrix image</dt>
<dd><pre><code>request(app)
.get('/images/misterdevo.svg')
.expect(200, done);</code></pre></dd>
</dl>
</section>
<section class="suite">
<h1>routes/index</h1>
<dl>
[0mGET / [32m200 [0m366.207 ms - 3131[0m
<dt>GET / respond with body</dt>
<dd><pre><code>request(app)
.get('/')
.expect('Content-Type', /html/)
.expect(200)
.expect(/<body>/, done);</code></pre></dd>
[0mGET /api/welcome [32m200 [0m1.652 ms - 372[0m
<dt>GET /api/welcome respond with json welcome messages</dt>
<dd><pre><code>request(app)
.get('/api/welcome')
.set('Accept', 'application/json')
.expect('Content-Type', /json/)
.expect(200, done);</code></pre></dd>
</dl>
</section>
<section class="suite">
<h1>routes/users</h1>
<dl>
[0mGET /users [32m200 [0m0.897 ms - 23[0m
<dt>GET /users respond with html</dt>
<dd><pre><code>request(app)
.get('/users')
.expect('Content-Type', /html/)
.expect(200, done);
//.expect(/<body>/, done);</code></pre></dd>
</dl>
</section>
<section class="suite">
<h1>routes/mail</h1>
<dl>
statusCode: 200
headers: { server: 'nginx',
date: 'Sat, 09 Apr 2016 14:58:00 GMT',
'content-type': 'application/json',
'content-length': '138',
connection: 'close',
'content-disposition': 'inline',
'access-control-allow-origin': '*',
'access-control-max-age': '600',
'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',
'access-control-allow-headers': 'Content-Type, x-requested-with' }
{
"id": "<20160409145800.15632.18322.5E839AA0@sandboxcf2d4ddabec04387b927fe6352358ed5.mailgun.org>",
"message": "Queued. Thank you."
}[0mPOST /mail [32m200 [0m720.198 ms - 37[0m
<dt>POST /mail with message respond status 200</dt>
<dd><pre><code>request(app)
.post('/mail')
.send({ email: '', message: 'hello from route test' })
.expect(200, done);</code></pre></dd>
[0mPOST /mail [31m500 [0m1.063 ms - -[0m
<dt>POST /mail without message respond status 500</dt>
<dd><pre><code>request(app)
.post('/mail')
.send({ email: '', message: '' })
.expect(500, done);</code></pre></dd>
</dl>
</section>
</dl>
</section>