You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
863 B
JavaScript
37 lines
863 B
JavaScript
7 years ago
|
/* global describe, it */
|
||
|
let app = require('../scripts/app')
|
||
|
let request = require('supertest').agent(app.listen())
|
||
|
let should = require('chai').should()
|
||
|
|
||
|
describe('App', () => {
|
||
|
it('/', (done) => {
|
||
|
request.get('/')
|
||
|
.expect('Content-Type', /html/)
|
||
|
.expect(200)
|
||
|
.end((err, res) => {
|
||
|
should.not.exist(err)
|
||
|
done()
|
||
|
})
|
||
|
})
|
||
|
it('/check.node', (done) => {
|
||
|
request.get('/check.node')
|
||
|
.expect('Content-Type', /text/)
|
||
|
.expect(200)
|
||
|
.end((err, res) => {
|
||
|
should.not.exist(err)
|
||
|
res.text.should.eq('success')
|
||
|
done()
|
||
|
})
|
||
|
})
|
||
|
it('/status.taobao', (done) => {
|
||
|
request.get('/status.taobao')
|
||
|
.expect('Content-Type', /text/)
|
||
|
.expect(200)
|
||
|
.end((err, res) => {
|
||
|
should.not.exist(err)
|
||
|
res.text.should.eq('success')
|
||
|
done()
|
||
|
})
|
||
|
})
|
||
|
})
|