Skip to content

Commit

Permalink
chore: Undo workaround for typegoose/mongodb-memory-server#846 (#293)
Browse files Browse the repository at this point in the history
And use proper fix.
  • Loading branch information
gnarea authored Jan 17, 2024
1 parent 32d79c3 commit 35a7cf6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"del-cli": "^5.1.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.1",
"mongodb-memory-server": "^9.1.5",
"mongodb-memory-server": "^9.1.6-beta.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.2",
"ts-jest": "^29.1.1",
Expand Down
6 changes: 1 addition & 5 deletions src/testUtils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ import { GcpSessionKey } from '../lib/gcp/models/GcpSessionKey';

const MODEL_CLASSES: readonly (new () => any)[] = [GcpIdentityKey, GcpSessionKey];

const MONGODB_VERSION = '6.0.3';

export function setUpTestDBConnection(): () => Connection {
let connectionURI: string;
let connection: Connection;
const mongoServer = new MongoMemoryServer({
binary: { version: MONGODB_VERSION },
});
const mongoServer = new MongoMemoryServer();
beforeAll(async () => {
await mongoServer.start();
connectionURI = mongoServer.getUri();
Expand Down

0 comments on commit 35a7cf6

Please sign in to comment.