diff options
Diffstat (limited to 'test/app.test.ts')
| -rw-r--r-- | test/app.test.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/app.test.ts b/test/app.test.ts new file mode 100644 index 0000000..c9f37c2 --- /dev/null +++ b/test/app.test.ts @@ -0,0 +1,25 @@ +import request from 'supertest'; + +import app from '../src/app'; + +describe('app', () => { + it('responds with a not found message', (done) => { + request(app) + .get('/what-is-this-even') + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(404, done); + }); +}); + +describe('GET /', () => { + it('responds with a json message', (done) => { + request(app) + .get('/') + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200, { + message: '🦄🌈✨👋🌎🌍🌏✨🌈🦄', + }, done); + }); +}); |
