mirror of https://github.com/embarklabs/embark.git
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', 'EmbarkJS', EmbarkJS, false);
|
||||
|
||||
this.events.on('code-generator-ready', () => {
|
||||
this.events.once('code-generator-ready', () => {
|
||||
if (this.ipc.connected) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ let version = require('../package.json').version;
|
|||
describe('embark.Console', function() {
|
||||
let ipc = new IPC({ipcRole: 'none'});
|
||||
let plugins = new Plugins({plugins: {}});
|
||||
let events = {on: () => {}, setCommandHandler: () => {}, emit: () => {}};
|
||||
let events = {once: () => {}, setCommandHandler: () => {}, emit: () => {}};
|
||||
let console = new Console({}, {plugins, version, ipc, events});
|
||||
|
||||
describe('#executeCmd', function() {
|
||||
|
|
Loading…
Reference in New Issue