add default debug log objects for tests

This commit is contained in:
Iuri Matias 2019-11-12 08:20:12 -05:00
parent d61be81642
commit 208ac98909
3 changed files with 16 additions and 0 deletions

View File

@ -59,6 +59,12 @@ export class EmbarkEmitter extends EventEmitter {
super();
if (options) {
this.debugLog = options.debugLog;
} else {
this.debugLog = {
log: () => {},
getStackTrace: () => { return ""; },
isEnabled: () => { return false; }
};
}
}

View File

@ -73,6 +73,7 @@ export interface Embark {
fs: any;
config: Config;
currentContext: string[];
logId: any;
registerActionForEvent(
name: string,
action: (params: any, cb: (error: any, result: any) => void) => void,

View File

@ -17,6 +17,15 @@ var Plugins = function(options) {
this.fs = fs;
this.env = options.env;
this.version = options.version;
if (!this.debugLog) {
this.debugLog = {
log: () => { },
moduleInit: () => { return ""; },
getStackTrace: () => { return ""; },
isEnabled: () => { return false; }
};
}
};
Plugins.deprecated = {