@@ -174,14 +174,36 @@ describe('MongodbInstance', () => {
174174 expect ( dbUtil . isAlive ( killerPid ) ) . toBeFalsy ( ) ;
175175 } ) ;
176176
177- it ( 'should work with mongodb 4.0.3' , async ( ) => {
178- const gotPort = await getPort ( { port : 27445 } ) ;
179- const mongod = await MongodbInstance . create ( {
180- instance : { port : gotPort , dbPath : tmpDir . name } ,
181- binary : { version : '4.0.3' } ,
177+ describe ( 'should work with mongodb LTS releases' , ( ) => {
178+ it ( 'should work with mongodb 4.0' , async ( ) => {
179+ const gotPort = await getPort ( { port : 27445 } ) ;
180+ const mongod = await MongodbInstance . create ( {
181+ instance : { port : gotPort , dbPath : tmpDir . name } ,
182+ binary : { version : '4.0.25' } , // explicit version instead of default to not mess it up later
183+ } ) ;
184+ expect ( mongod . mongodProcess ! . pid ) . toBeGreaterThan ( 0 ) ;
185+ await mongod . stop ( ) ;
186+ } ) ;
187+
188+ it ( 'should work with mongodb 4.2' , async ( ) => {
189+ const gotPort = await getPort ( { port : 27445 } ) ;
190+ const mongod = await MongodbInstance . create ( {
191+ instance : { port : gotPort , dbPath : tmpDir . name } ,
192+ binary : { version : '4.2.14' } ,
193+ } ) ;
194+ expect ( mongod . mongodProcess ! . pid ) . toBeGreaterThan ( 0 ) ;
195+ await mongod . stop ( ) ;
196+ } ) ;
197+
198+ it ( 'should work with mongodb 4.4' , async ( ) => {
199+ const gotPort = await getPort ( { port : 27445 } ) ;
200+ const mongod = await MongodbInstance . create ( {
201+ instance : { port : gotPort , dbPath : tmpDir . name } ,
202+ binary : { version : '4.4.6' } ,
203+ } ) ;
204+ expect ( mongod . mongodProcess ! . pid ) . toBeGreaterThan ( 0 ) ;
205+ await mongod . stop ( ) ;
182206 } ) ;
183- expect ( mongod . mongodProcess ! . pid ) . toBeGreaterThan ( 0 ) ;
184- await mongod . stop ( ) ;
185207 } ) ;
186208
187209 it ( '"kill" should not call "killProcess" if no childProcesses are not running' , async ( ) => {
0 commit comments