Skip to content

Instantly share code, notes, and snippets.

/app.test.ts Secret

Created March 7, 2018 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c0d2150aded9f127c5d497f09bd0f1f6 to your computer and use it in GitHub Desktop.
Save anonymous/c0d2150aded9f127c5d497f09bd0f1f6 to your computer and use it in GitHub Desktop.
import request from 'supertest';
import app from './app';
test('Hello world works', async () => {
const response = await request(app.callback()).get('/');
expect(response.status).toBe(200);
expect(response.text).toBe('Hello World');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment