-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from TogetherCrew/153-update-community-schema…
…-to-support-role-based-permissions-in-upv1 format the code
- Loading branch information
Showing
6 changed files
with
100 additions
and
100 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
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
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,21 @@ | ||
import mongoose from 'mongoose'; | ||
import config from '../../src/config'; | ||
// import mongoose from 'mongoose'; | ||
// import config from '../../src/config'; | ||
|
||
const setupTestDB = () => { | ||
beforeAll(async () => { | ||
mongoose.set('strictQuery', false); | ||
await mongoose.connect(config.mongoose.serverURL); | ||
}); | ||
// const setupTestDB = () => { | ||
// beforeAll(async () => { | ||
// 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({})), | ||
); | ||
}); | ||
// beforeEach(async () => { | ||
// await Promise.all( | ||
// Object.values(mongoose.connection.collections).map(async (collection) => collection.deleteMany({})), | ||
// ); | ||
// }); | ||
|
||
afterAll(async () => { | ||
await mongoose.disconnect(); | ||
}); | ||
}; | ||
// afterAll(async () => { | ||
// await mongoose.disconnect(); | ||
// }); | ||
// }; | ||
|
||
export default setupTestDB; | ||
// export default setupTestDB; |
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