@@ -1471,10 +1471,10 @@ describe('DataService', function () {
14711471 buz : [ 'foo' , 'bar' ] ,
14721472 } ,
14731473 } ) ;
1474- const dbs = ( await dataService . listCollections ( 'buz' ) ) . map (
1475- ( db ) => db . name
1474+ const colls = ( await dataService . listCollections ( 'buz' ) ) . map (
1475+ ( coll ) => coll . name
14761476 ) ;
1477- expect ( dbs ) . to . deep . eq ( [ 'foo' , 'bar' ] ) ;
1477+ expect ( colls ) . to . deep . eq ( [ 'foo' , 'bar' ] ) ;
14781478 } ) ;
14791479
14801480 it ( 'returns collections with `find` privilege from privileges' , async function ( ) {
@@ -1496,10 +1496,10 @@ describe('DataService', function () {
14961496 } ,
14971497 } ,
14981498 } ) ;
1499- const dbs = ( await dataService . listCollections ( 'foo' ) ) . map (
1500- ( db ) => db . name
1499+ const colls = ( await dataService . listCollections ( 'foo' ) ) . map (
1500+ ( coll ) => coll . name
15011501 ) ;
1502- expect ( dbs ) . to . deep . eq ( [ 'bar' ] ) ;
1502+ expect ( colls ) . to . deep . eq ( [ 'bar' ] ) ;
15031503 } ) ;
15041504
15051505 it ( 'filters out collections with no name from privileges' , async function ( ) {
@@ -1521,10 +1521,10 @@ describe('DataService', function () {
15211521 } ,
15221522 } ,
15231523 } ) ;
1524- const dbs = ( await dataService . listCollections ( 'foo' ) ) . map (
1525- ( db ) => db . name
1524+ const colls = ( await dataService . listCollections ( 'foo' ) ) . map (
1525+ ( coll ) => coll . name
15261526 ) ;
1527- expect ( dbs ) . to . deep . eq ( [ 'buz' ] ) ;
1527+ expect ( colls ) . to . deep . eq ( [ 'buz' ] ) ;
15281528 } ) ;
15291529
15301530 it ( 'merges collections from listCollections and privileges' , async function ( ) {
@@ -1549,13 +1549,13 @@ describe('DataService', function () {
15491549 foo : [ 'buz' , 'bla' , 'meow' ] ,
15501550 } ,
15511551 } ) ;
1552- const dbs = ( await dataService . listCollections ( 'foo' ) ) . map (
1553- ( db ) => db . name
1552+ const colls = ( await dataService . listCollections ( 'foo' ) ) . map (
1553+ ( coll ) => coll . name
15541554 ) ;
1555- expect ( dbs ) . to . deep . eq ( [ 'bar' , 'buz' , 'bla' , 'meow' ] ) ;
1555+ expect ( colls ) . to . deep . eq ( [ 'bar' , 'buz' , 'bla' , 'meow' ] ) ;
15561556 } ) ;
15571557
1558- it ( 'returns result from privileges even if listDatabases threw any error' , async function ( ) {
1558+ it ( 'returns result from privileges even if listCollections threw any error' , async function ( ) {
15591559 const dataService = createDataServiceWithMockedClient ( {
15601560 commands : {
15611561 connectionStatus : {
@@ -1573,8 +1573,10 @@ describe('DataService', function () {
15731573 foo : new Error ( 'nope' ) ,
15741574 } ,
15751575 } ) ;
1576- const dbs = ( await dataService . listDatabases ( ) ) . map ( ( db ) => db . name ) ;
1577- expect ( dbs ) . to . deep . eq ( [ 'foo' ] ) ;
1576+ const colls = ( await dataService . listCollections ( 'foo' ) ) . map (
1577+ ( coll ) => coll . name
1578+ ) ;
1579+ expect ( colls ) . to . deep . eq ( [ 'bar' ] ) ;
15781580 } ) ;
15791581 } ) ;
15801582 } ) ;
0 commit comments