| 44 | delete process.env.NODE_RED_HOME; |
| 45 | }); |
| 46 | function mockUtil(metrics) { |
| 47 | sinon.stub(log,"log").callsFake(function(){}) |
| 48 | sinon.stub(log,"warn").callsFake(function(){}) |
| 49 | sinon.stub(log,"info").callsFake(function(){}) |
| 50 | sinon.stub(log,"trace").callsFake(function(){}) |
| 51 | sinon.stub(log,"metric").callsFake(function(){ return !!metrics }) |
| 52 | sinon.stub(log,"_").callsFake(function(){ return "abc"}) |
| 53 | sinon.stub(i18n,"registerMessageCatalog").callsFake(function(){ return Promise.resolve()}) |
| 54 | } |
| 55 | function unmockUtil() { |
| 56 | log.log.restore && log.log.restore(); |
| 57 | log.warn.restore && log.warn.restore(); |