-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72e7e74
commit 23438f0
Showing
9 changed files
with
49 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"standard-with-typescript", | ||
"prettier" | ||
], | ||
"overrides": [], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": {}, | ||
"ignorePatterns": [ | ||
"coverage", | ||
"dist", | ||
"__tests__/", | ||
"*.json", | ||
"*.yml", | ||
"*.js" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
src/**/*.js | ||
*.json | ||
*.log | ||
*.yml | ||
*.yml | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import mongoose from "mongoose"; | ||
import config from "../../src/config"; | ||
import mongoose from 'mongoose'; | ||
import config from '../../src/config'; | ||
import RabbitMQ, { MBConnection, Queue } from '@togethercrew.dev/tc-messagebroker'; | ||
|
||
const setupTestDB = () => { | ||
beforeAll(async () => { | ||
mongoose.set("strictQuery", false); | ||
mongoose.set('strictQuery', false); | ||
await mongoose.connect(config.mongoose.serverURL); | ||
|
||
}); | ||
|
||
beforeEach(async () => { | ||
await Promise.all(Object.values(mongoose.connection.collections).map(async (collection) => collection.deleteMany({}))); | ||
await Promise.all( | ||
Object.values(mongoose.connection.collections).map(async (collection) => collection.deleteMany({})), | ||
); | ||
}); | ||
|
||
afterAll(async () => { | ||
await mongoose.disconnect(); | ||
}); | ||
}; | ||
|
||
export default setupTestDB; | ||
export default setupTestDB; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters