+
)}
diff --git a/packages/compass-shell/src/components/compass-shell/compass-shell.spec.js b/packages/compass-shell/src/components/compass-shell/compass-shell.spec.js
index 7c9fab6193..c34e260716 100644
--- a/packages/compass-shell/src/components/compass-shell/compass-shell.spec.js
+++ b/packages/compass-shell/src/components/compass-shell/compass-shell.spec.js
@@ -63,6 +63,29 @@ describe('CompassShell', () => {
top:
,
});
});
+
+ it('renders the Shell with an output change handler', () => {
+ const fakeRuntime = {};
+ const wrapper = shallow(
);
+ expect(!!wrapper.find(Shell).prop('onOutputChanged')).to.equal(true);
+ });
+
+ it('passes saved shell output', () => {
+ const fakeRuntime = {};
+ const wrapper = shallow(
);
+
+ expect(wrapper.find(Shell).prop('initialOutput')).to.deep.equal([{
+ type: 'output',
+ value: 'pineapple'
+ }]);
+ });
});
context('when historyStorage is not present', () => {
@@ -187,5 +210,19 @@ describe('CompassShell', () => {
).to.equal(true);
});
});
+
+ it('sets shellOutput on onShellOutputChanged', () => {
+ const shell = new CompassShell({ isExpanded: true });
+
+ shell.onShellOutputChanged([{
+ type: 'output',
+ value: 'some output'
+ }]);
+
+ expect(shell.shellOutput).to.deep.equal([{
+ type: 'output',
+ value: 'some output'
+ }]);
+ });
});
diff --git a/packages/compass-shell/src/components/info-modal/info-modal.jsx b/packages/compass-shell/src/components/info-modal/info-modal.jsx
index 1a37a7c25f..4da2ad2428 100644
--- a/packages/compass-shell/src/components/info-modal/info-modal.jsx
+++ b/packages/compass-shell/src/components/info-modal/info-modal.jsx
@@ -26,6 +26,9 @@ const hotkeys = [{
}, {
key: 'Ctrl+H',
description: 'Erases one character. Similar to hitting backspace.'
+}, {
+ key: 'Ctrl+L',
+ description: 'Clears the screen, similar to the clear command.'
}, {
key: 'Ctrl+T',
description: 'Swap the last two characters before the cursor.'
@@ -75,7 +78,10 @@ export class InfoModal extends PureComponent {
{hotkeys.map(shortcut => (
-
+
{shortcut.key}{shortcut.description}
diff --git a/packages/shell-api/src/decorators.ts b/packages/shell-api/src/decorators.ts
index 9f3349c81f..7b62c09016 100644
--- a/packages/shell-api/src/decorators.ts
+++ b/packages/shell-api/src/decorators.ts
@@ -45,7 +45,12 @@ interface TypeSignature {
interface Signatures {
[key: string]: TypeSignature;
}
-const signatures = {} as Signatures;
+const signaturesGlobalIdentifier = '@@@mdb.signatures@@@';
+if (!global[signaturesGlobalIdentifier]) {
+ global[signaturesGlobalIdentifier] = {};
+}
+
+const signatures: Signatures = global[signaturesGlobalIdentifier];
export const toIgnore = [asShellResult, 'asPrintable', 'constructor'];
export function shellApiClassDefault(constructor: Function): void {