MCPcopy
hub / github.com/node-red/node-red / mockUtil

Function mockUtil

test/unit/@node-red/runtime/lib/index_spec.js:46–54  ·  view source on GitHub ↗
(metrics)

Source from the content-addressed store, hash-verified

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();

Callers 1

index_spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected