-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): fix ci test stability (#1185)
- Loading branch information
1 parent
bf384f5
commit d7132d0
Showing
9 changed files
with
48 additions
and
35 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
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,16 +1,10 @@ | ||
import { MongooseModule } from '@nestjs/mongoose'; | ||
import { MongoMemoryServer } from 'mongodb-memory-server'; | ||
|
||
export const mongooseTestingModule = (mongod?: MongoMemoryServer) => | ||
MongooseModule.forRootAsync({ | ||
useFactory: async () => { | ||
mongod = mongod ?? (await MongoMemoryServer.create()); | ||
return { | ||
uri: mongod.getUri(), | ||
useNewUrlParser: true, | ||
useUnifiedTopology: true, | ||
useFindAndModify: false, | ||
useCreateIndex: true, | ||
}; | ||
}, | ||
export const mongooseTestingModule = (mongod: MongoMemoryServer) => | ||
MongooseModule.forRoot(mongod.getUri(), { | ||
useNewUrlParser: true, | ||
useUnifiedTopology: true, | ||
useFindAndModify: false, | ||
useCreateIndex: true, | ||
}); |