You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
355 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. const request = require("supertest");
  2. const app = require("../index");
  3. describe("Get route", () => {
  4. it("page should return hello Mr Jenkins", async () => {
  5. const res = await request(app).get("/");
  6. expect(res.statusCode).toEqual(200);
  7. expect(res.body).toEqual("Hello Mr Jenkins");
  8. });
  9. });
  10. afterAll(async () => {
  11. await app.close();
  12. });