diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-05-29 14:48:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-05-29 14:53:08 -0700 |
| commit | 548498d37424f2ac579770962b627aeba61925e8 (patch) | |
| tree | 1d02f147b82dd8f9a48296f01a2ae2e84d71958c /test/api.test.ts | |
| download | chessh-bot-548498d37424f2ac579770962b627aeba61925e8.tar.gz chessh-bot-548498d37424f2ac579770962b627aeba61925e8.zip | |
added bot
Diffstat (limited to 'test/api.test.ts')
| -rw-r--r-- | test/api.test.ts | 25 |
1 files changed, 25 insertions, 0 deletions
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); + }); +}); |
