From 548498d37424f2ac579770962b627aeba61925e8 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 29 May 2023 14:48:50 -0700 Subject: added bot --- test/api.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/api.test.ts (limited to 'test/api.test.ts') diff --git a/test/api.test.ts b/test/api.test.ts new file mode 100644 index 0000000..2e94e6d --- /dev/null +++ b/test/api.test.ts @@ -0,0 +1,25 @@ +import request from 'supertest'; + +import app from '../src/app'; + +describe('GET /api/v1', () => { + it('responds with a json message', (done) => { + request(app) + .get('/api/v1') + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200, { + message: 'API - 👋🌎🌍🌏', + }, done); + }); +}); + +describe('GET /api/v1/emojis', () => { + it('responds with a json message', (done) => { + request(app) + .get('/api/v1/emojis') + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200, ['😀', '😳', '🙄'], done); + }); +}); -- cgit v1.3