diff options
Diffstat (limited to 'test/nodeserver.test.ts')
| -rw-r--r-- | test/nodeserver.test.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/nodeserver.test.ts b/test/nodeserver.test.ts new file mode 100644 index 0000000..213b8d0 --- /dev/null +++ b/test/nodeserver.test.ts @@ -0,0 +1,26 @@ +import * as mocha from 'mocha'; +import * as chai from 'chai'; +import chaiHttp = require('chai-http'); + +import app from '../src/app'; + +chai.use(chaiHttp); +const expect = chai.expect; + +describe('baseRoute', () => { + + it('should be json', () => { + return chai.request(app).get('/') + .then(res => { + expect(res.type).to.eql('application/json'); + }); + }); + + it('should have a message prop', () => { + return chai.request(app).get('/') + .then(res => { + expect(res.body.message).to.eql('Hello World!'); + }); + }); + +}); |
