Merge pull request #771 from embark-framework/bugfix/message0-events-already-declared
Fix message events already declared
This commit is contained in:
commit
0428ff83cb
|
@ -77,7 +77,7 @@ class Console {
|
||||||
this.events.emit('runcode:register', 'Web3', Web3, false);
|
this.events.emit('runcode:register', 'Web3', Web3, false);
|
||||||
this.events.emit('runcode:register', 'EmbarkJS', EmbarkJS, false);
|
this.events.emit('runcode:register', 'EmbarkJS', EmbarkJS, false);
|
||||||
|
|
||||||
this.events.on('code-generator-ready', () => {
|
this.events.once('code-generator-ready', () => {
|
||||||
if (this.ipc.connected) {
|
if (this.ipc.connected) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ let version = require('../package.json').version;
|
||||||
describe('embark.Console', function() {
|
describe('embark.Console', function() {
|
||||||
let ipc = new IPC({ipcRole: 'none'});
|
let ipc = new IPC({ipcRole: 'none'});
|
||||||
let plugins = new Plugins({plugins: {}});
|
let plugins = new Plugins({plugins: {}});
|
||||||
let events = {on: () => {}, setCommandHandler: () => {}, emit: () => {}};
|
let events = {once: () => {}, setCommandHandler: () => {}, emit: () => {}};
|
||||||
let console = new Console({}, {plugins, version, ipc, events});
|
let console = new Console({}, {plugins, version, ipc, events});
|
||||||
|
|
||||||
describe('#executeCmd', function() {
|
describe('#executeCmd', function() {
|
||||||
|
|
Loading…
Reference in New Issue