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();
|
super();
|
||||||
if (options) {
|
if (options) {
|
||||||
this.debugLog = options.debugLog;
|
this.debugLog = options.debugLog;
|
||||||
|
} else {
|
||||||
|
this.debugLog = {
|
||||||
|
log: () => {},
|
||||||
|
getStackTrace: () => { return ""; },
|
||||||
|
isEnabled: () => { return false; }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ export interface Embark {
|
||||||
fs: any;
|
fs: any;
|
||||||
config: Config;
|
config: Config;
|
||||||
currentContext: string[];
|
currentContext: string[];
|
||||||
|
logId: any;
|
||||||
registerActionForEvent(
|
registerActionForEvent(
|
||||||
name: string,
|
name: string,
|
||||||
action: (params: any, cb: (error: any, result: any) => void) => void,
|
action: (params: any, cb: (error: any, result: any) => void) => void,
|
||||||
|
|
|
@ -17,6 +17,15 @@ var Plugins = function(options) {
|
||||||
this.fs = fs;
|
this.fs = fs;
|
||||||
this.env = options.env;
|
this.env = options.env;
|
||||||
this.version = options.version;
|
this.version = options.version;
|
||||||
|
|
||||||
|
if (!this.debugLog) {
|
||||||
|
this.debugLog = {
|
||||||
|
log: () => { },
|
||||||
|
moduleInit: () => { return ""; },
|
||||||
|
getStackTrace: () => { return ""; },
|
||||||
|
isEnabled: () => { return false; }
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Plugins.deprecated = {
|
Plugins.deprecated = {
|
||||||
|
|
Loading…
Reference in New Issue