fix(console): fix ENS tests not working with embark side by side

This commit is contained in:
Jonathan Rainville 2019-02-25 13:38:10 -05:00
parent 9ea0383046
commit e20c08ac6f
3 changed files with 5 additions and 2 deletions

View File

@ -31,5 +31,6 @@ export interface Embark {
logger: Logger;
fs: any;
config: Config;
currentContext: string[];
registerActionForEvent(name: string, action: (callback: () => void) => void): void;
}

View File

@ -3,6 +3,7 @@ const env = require("../../core/env");
const utils = require("../../utils/utils");
const escapeHtml = require("../../utils/escapeHtml");
import { Callback } from "embark";
import constants from "../../constants.json";
const stringify = require("json-stringify-safe");
import { waterfall } from "async";
import { Embark, Events } from "embark";
@ -85,7 +86,7 @@ class Console {
}
private get isEmbarkConsole() {
return this.ipc.connected && this.ipc.isClient();
return this.ipc.connected && this.ipc.isClient() && this.embark.currentContext && this.embark.currentContext.includes(constants.contexts.console);
}
private cmdHistorySize() {

View File

@ -7,6 +7,7 @@
"noEmit": true,
"noImplicitThis": false,
"strict": true,
"target": "ES2017"
"target": "ES2017",
"resolveJsonModule": true
}
}