init
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import * as supertest from "supertest";
|
||||
import { default as app } from "../src/server";
|
||||
const request = supertest("localhost:3000");
|
||||
|
||||
describe("GET /api", () => {
|
||||
it("should return 200 OK", () => {
|
||||
request
|
||||
.get("/api")
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as supertest from "supertest";
|
||||
import { default as app } from "../src/server";
|
||||
|
||||
const request = supertest("localhost:3000");
|
||||
|
||||
describe("GET /random-url", () => {
|
||||
it("should return 404", () => {
|
||||
return request.get("/random-url").then((response) => {
|
||||
expect(response.status).toBe(404);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as supertest from "supertest";
|
||||
import { default as app } from "../src/server";
|
||||
const request = supertest("localhost:3000");
|
||||
|
||||
describe("GET /contact", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/contact")
|
||||
.expect(200, done);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as supertest from "supertest";
|
||||
import { default as app } from "../src/server";
|
||||
const request = supertest("localhost:3000");
|
||||
|
||||
describe("GET /", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/")
|
||||
.expect(200, done);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import * as supertest from "supertest";
|
||||
import { default as app } from "../src/server";
|
||||
const request = supertest("localhost:3000");
|
||||
|
||||
describe("GET /login", () => {
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/login").then((response) => {
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("GET /signup", () => {
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/signup").then((response) => {
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user