mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2025-11-08 16:17:37 +00:00
change tests to not always pass
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {} from 'jest';
|
||||
import {} from "jest";
|
||||
import * as supertest from "supertest";
|
||||
|
||||
const request = supertest("http://localhost:8000");
|
||||
const request = supertest("http://localhost:3000");
|
||||
|
||||
describe("GET /api", () => {
|
||||
it("should return 200 OK", () => {
|
||||
request
|
||||
return request
|
||||
.get("/api")
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {} from 'jest';
|
||||
import {} from "jest";
|
||||
import * as supertest from "supertest";
|
||||
const request = supertest("http://localhost:8000");
|
||||
const request = supertest("http://localhost:3000");
|
||||
|
||||
describe("GET /random-url", () => {
|
||||
it("should return 404", (done) => {
|
||||
request.get("/reset")
|
||||
.expect(404, done);
|
||||
it("should return 404", () => {
|
||||
return request.get("/reset")
|
||||
.expect(404);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {} from 'jest';
|
||||
import {} from "jest";
|
||||
import * as supertest from "supertest";
|
||||
const request = supertest("http://localhost:8000");
|
||||
const request = supertest("http://localhost:3000");
|
||||
|
||||
describe("GET /contact", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/contact")
|
||||
.expect(200, done);
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/contact")
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {} from 'jest';
|
||||
import {} from "jest";
|
||||
import * as supertest from "supertest";
|
||||
const request = supertest("http://localhost:8000");
|
||||
const request = supertest("http://localhost:3000");
|
||||
|
||||
describe("GET /", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/")
|
||||
.expect(200, done);
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/")
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import {} from 'jest';
|
||||
import {} from "jest";
|
||||
import * as supertest from "supertest";
|
||||
const request = supertest("http://localhost:8000");
|
||||
const request = supertest("http://localhost:3000");
|
||||
|
||||
describe("GET /login", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/login")
|
||||
.expect(200, done);
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/login")
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
describe("GET /signup", () => {
|
||||
it("should return 200 OK", (done) => {
|
||||
request.get("/signup")
|
||||
.expect(200, done);
|
||||
it("should return 200 OK", () => {
|
||||
return request.get("/signup")
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user