mirror of https://github.com/embarklabs/embark.git
add default debug log objects for tests
This commit is contained in:
parent
d61be81642
commit
208ac98909
|
@ -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; }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue