Skip to content

Commit

Permalink
solved jest leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhravHussen committed Jul 24, 2023
1 parent c2cfbab commit 349adfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"start": "ts-node-dev src/index.ts",
"test": "jest --watchAll --no-cache --detectOpenHandles",
"test": "jest --watchAll --no-cache ",
"test:ci": "jest --detectOpenHandles"
},
"jest": {
Expand Down
3 changes: 1 addition & 2 deletions auth/src/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { MongoMemoryServer } from "mongodb-memory-server";
import mongoose from "mongoose";
import app from "../app";

let mongo: any;
beforeAll(async () => {
process.env.JWT_SECRET = "test";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

const mongo = await MongoMemoryServer.create();
mongo = await MongoMemoryServer.create();
const mongoUri = mongo.getUri();

await mongoose.connect(mongoUri, {});
Expand Down

0 comments on commit 349adfa

Please sign in to comment.