Merge pull request #771 from embark-framework/bugfix/message0-events-already-declared

Fix message events already declared
This commit is contained in:
Iuri Matias 2018-08-31 15:45:40 -04:00 committed by GitHub
commit 0428ff83cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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;
} }

View File

@ -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() {