@@ -7,47 +7,41 @@ import { ReadPreference } from '../../src/read_preference';
77describe ( 'class Db' , function ( ) {
88 describe ( 'secondaryOk' , function ( ) {
99 const client = new MongoClient ( 'mongodb://localhost:27017' ) ;
10- const legacy_secondary_ok = 'slaveOk' ;
1110 const secondary_ok = 'secondaryOk' ;
1211
1312 it ( 'should be false when readPreference is Primary' , function ( ) {
1413 const options : DbOptions = { readPreference : ReadPreference . PRIMARY } ;
1514 const mydb = new Db ( client , 'mydb' , options ) ;
1615
1716 expect ( mydb ) . property ( secondary_ok ) . to . be . false ;
18- expect ( mydb ) . property ( legacy_secondary_ok ) . to . be . false ;
1917 } ) ;
2018
2119 it ( 'should be true when readPreference is Primary Preferred' , function ( ) {
2220 const options : DbOptions = { readPreference : ReadPreference . PRIMARY_PREFERRED } ;
2321 const mydb = new Db ( client , 'mydb' , options ) ;
2422
2523 expect ( mydb ) . property ( secondary_ok ) . to . be . true ;
26- expect ( mydb ) . property ( legacy_secondary_ok ) . to . be . true ;
2724 } ) ;
2825
2926 it ( 'should be true when readPreference is Secondary' , function ( ) {
3027 const options : DbOptions = { readPreference : ReadPreference . SECONDARY } ;
3128 const mydb = new Db ( client , 'mydb' , options ) ;
3229
3330 expect ( mydb ) . property ( secondary_ok ) . to . be . true ;
34- expect ( mydb ) . property ( legacy_secondary_ok ) . to . be . true ;
3531 } ) ;
3632
3733 it ( 'should be true when readPreference is Secondary Preferred' , function ( ) {
3834 const options : DbOptions = { readPreference : ReadPreference . SECONDARY_PREFERRED } ;
3935 const mydb = new Db ( client , 'mydb' , options ) ;
4036
4137 expect ( mydb ) . property ( secondary_ok ) . to . be . true ;
42- expect ( mydb ) . property ( legacy_secondary_ok ) . to . be . true ;
4338 } ) ;
4439
4540 it ( 'should be true when readPreference is Nearest' , function ( ) {
4641 const options : DbOptions = { readPreference : ReadPreference . NEAREST } ;
4742 const mydb = new Db ( client , 'mydb' , options ) ;
4843
4944 expect ( mydb ) . property ( secondary_ok ) . to . be . true ;
50- expect ( mydb ) . property ( legacy_secondary_ok ) . to . be . true ;
5145 } ) ;
5246 } ) ;
5347} ) ;
0 commit comments