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/app.test.ts | |
| download | chessh-bot-548498d37424f2ac579770962b627aeba61925e8.tar.gz chessh-bot-548498d37424f2ac579770962b627aeba61925e8.zip | |
added bot
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); + }); +}); |
