@@ -3,6 +3,7 @@ const { withClient, setupDatabase } = require('./shared');
3
3
const test = require ( './shared' ) . assert ;
4
4
const { expect } = require ( 'chai' ) ;
5
5
const { ServerHeartbeatStartedEvent } = require ( '../../src' ) ;
6
+ const { Topology } = require ( '../../src/sdam/topology' ) ;
6
7
7
8
describe ( 'Connection - functional' , function ( ) {
8
9
before ( function ( ) {
@@ -70,21 +71,16 @@ describe('Connection - functional', function () {
70
71
}
71
72
} ) ;
72
73
73
- it ( 'should correctly connect to server using just events' , {
74
- metadata : {
75
- requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] }
76
- } ,
77
-
78
- test : function ( done ) {
79
- var configuration = this . configuration ;
80
- var client = configuration . newClient ( { w : 1 } , { maxPoolSize : 1 } ) ;
74
+ it ( 'should correctly connect to server using just events' , function ( done ) {
75
+ var configuration = this . configuration ;
76
+ var client = configuration . newClient ( { w : 1 } , { maxPoolSize : 1 } ) ;
81
77
82
- client . on ( 'open' , function ( ) {
83
- client . close ( done ) ;
84
- } ) ;
78
+ client . on ( 'open' , topology => {
79
+ expect ( topology ) . to . be . instanceOf ( Topology ) ;
80
+ client . close ( done ) ;
81
+ } ) ;
85
82
86
- client . connect ( ) ;
87
- }
83
+ client . connect ( ) ;
88
84
} ) ;
89
85
90
86
it ( 'should correctly connect to server using big connection pool' , {
0 commit comments