-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
A very simplified code to view the problem:
app.ts
import * as Koa from "koa";
import * as redisStore from "koa-redis";
const app = new Koa();
const store = redisStore({});
export default app;
app.test.ts
import * as supertest from "supertest";
import app from "../src/app";
const request = supertest(app.callback());
describe("test", () => {
test("route GET /", async () => {
const response = await request.get("/");
expect(response.status).toEqual(404);
});
});
Jest complains that "there are asynchronous operations that weren't stopped in your tests", if I comment out
const store = redisStore({});
then it closes as expected, so I figured the issue is caused by this library. Anything I need to implement in code/tests or this is a bug?
Metadata
Metadata
Assignees
Labels
No labels