Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
collection
admin.collection
Original file line number Diff line number Diff line change
@@ -1 +1 @@
StringResult: does not exist
StringResult: test.does not exist
2 changes: 1 addition & 1 deletion packages/shell-api/src/collection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Collection', () => {
const coll = new Collection(mongo as any, db, 'myCollection');
it('toShellResult', async() => {
expect((await toShellResult(coll)).type).to.equal('Collection');
expect((await toShellResult(coll)).printable).to.equal('myCollection');
expect((await toShellResult(coll)).printable).to.equal('myDB.myCollection');
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/shell-api/src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default class Collection extends ShellApiWithMongoClass {
* Internal method to determine what is printed for this class.
*/
[asPrintable](): string {
return this._name;
return `${this._database.getName()}.${this._name}`;
}

/**
Expand Down