Skip to content

Commit

Permalink
fix(ci): add pretest script to ensure mongodb binaries are downloaded…
Browse files Browse the repository at this point in the history
… before test run
  • Loading branch information
tobisupreme committed Sep 10, 2023
1 parent 63c6a64 commit 0de4179
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lint": "eslint .",
"format:check": "npx prettier --check .",
"format:write": "npx prettier --write .",
"pretest": "node test",
"test": "APP_ENV=test jest --runInBand",
"seed:track": "node ./seeders/trackSeeder.js"
},
Expand Down
11 changes: 11 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { MongoMemoryServer } = require('mongodb-memory-server');

async function run() {
const mongod = await MongoMemoryServer.create();

mongod.getUri();

await mongod.stop();
}

run();

0 comments on commit 0de4179

Please sign in to comment.