Skip to content

Commit

Permalink
test: Add MongoMemoryReplSet support
Browse files Browse the repository at this point in the history
  • Loading branch information
arisjulio committed Dec 27, 2021
1 parent f981596 commit 68f9e2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ jobs:
key: v2-dependencies-{{ checksum "package.json" }}

- run: yarn test
- run: yarn test:repl
14 changes: 14 additions & 0 deletions jest-mongodb-config-repl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
mongodbMemoryServerOptions: {
binary: {
skipMD5: true,
},
autoStart: false,
instance: {},
replSet: {
count: 4,
storageEngine: 'wiredTiger',
},
},
mongoURLEnvName: 'MONGO_URL',
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"scripts": {
"lint": "eslint . --fix --ext .js,.json,.ts --quiet",
"test": "jest"
"test": "jest",
"test:repl": "MONGO_MEMORY_SERVER_FILE=jest-mongodb-config-repl.js jest"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit 68f9e2d

Please sign in to comment.