Skip to content

Commit 49062b5

Browse files
committed
top-level help fix
1 parent 75c41e6 commit 49062b5

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

packages/i18n/src/locales/en_US.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,12 +1059,6 @@ const translations = {
10591059
example: 'db.collection.getIndexKeys()',
10601060
parameters: {}
10611061
},
1062-
getIndices: {
1063-
link: '',
1064-
description: '',
1065-
example: '',
1066-
parameters: {}
1067-
},
10681062
getIndexSpecs: {
10691063
link: '',
10701064
description: '',

packages/shell-api/src/shell-api.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ describe('ShellApi', () => {
168168
internalState.setCtx({});
169169
internalState.currentDb.mongo = mongo;
170170
});
171+
it('calls help function', () => {
172+
expect(internalState.context.use.help().shellApiType()).to.equal('Help');
173+
expect(internalState.context.use.help.shellApiType()).to.equal('Help');
174+
});
171175
describe('use', () => {
172176
beforeEach(() => {
173177
internalState.context.use('testdb');

packages/shell-api/src/shell-internal-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export default class ShellInternalState {
101101
contextObject[n] = (...args): any => {
102102
return this.shellApi[n](...args);
103103
};
104+
contextObject[n].help = this.shellApi[n].help;
104105
});
105106
contextObject.quit = contextObject.exit;
106107
contextObject.help = this.shellApi.help;
@@ -152,4 +153,3 @@ export default class ShellInternalState {
152153
this.messageBus.emit('mongosh:api-call', event);
153154
}
154155
}
155-

0 commit comments

Comments
 (0)