diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/hm.js | 9 | ||||
| -rw-r--r-- | test/hm.test.ts (renamed from test/hm.ts) | 0 | ||||
| -rw-r--r-- | test/nodeserver.test.ts | 26 |
3 files changed, 26 insertions, 9 deletions
diff --git a/test/hm.js b/test/hm.js deleted file mode 100644 index b6cc906..0000000 --- a/test/hm.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const chai_1 = require("chai"); -require("mocha"); -describe('placeholder test', () => { - it('should pass', () => { - chai_1.expect(true).to.equal(true); - }); -}); diff --git a/test/hm.ts b/test/hm.test.ts index e31f356..e31f356 100644 --- a/test/hm.ts +++ b/test/hm.test.ts 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!'); + }); + }); + +}); |
