File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2222 "build:schemas" : " node scripts/buildSchemas.mjs" ,
2323 "cdep" : " tsc && madge --circular dist" ,
2424 "lint:tsc" : " tsc --noEmit && tsc -p test/tsconfig.json --noEmit" ,
25- "test:ci:lokijs" : " jest -i --coverage" ,
26- "test:ci:mongodb" : " jest -i --coverage" ,
25+ "test:ci:lokijs" : " USE_LOKIJS=true jest -i --coverage" ,
26+ "test:ci:mongodb" : " USE_LOKIJS=true jest -i --coverage" ,
2727 "test:local:ferretdb" : " npm run test:local:start:ferretdb && CONNECTION_STRING='mongodb://root:example@localhost:27022' jest" ,
2828 "test:local:lokijs" : " USE_LOKIJS=true jest" ,
2929 "test:local:mongodb" : " npm run test:local:start:mongodb && CONNECTION_STRING='mongodb://root:example@localhost:27021' jest" ,
Original file line number Diff line number Diff line change @@ -72,14 +72,15 @@ export class TestRuntime extends Runtime {
7272 } ;
7373 }
7474
75- protected createDatabaseConnection ( ) : Promise < IDatabaseConnection > {
75+ protected async createDatabaseConnection ( ) : Promise < IDatabaseConnection > {
7676 if ( this . dbConnection ) {
7777 throw new Error ( "DbConnection already created" ) ;
7878 }
7979
80- this . dbConnection = LokiJsConnection . inMemory ( ) ;
80+ this . dbConnection = new MongoDbConnection ( process . env . CONNECTION_STRING ! ) ;
81+ await this . dbConnection . connect ( ) ;
8182
82- return Promise . resolve ( this . dbConnection ) ;
83+ return this . dbConnection ;
8384 }
8485
8586 protected async initAccount ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments