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

Function beforeEach

test/unit/@node-red/editor-api/lib/index_spec.js:33–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32describe("api/index", function() {
33 var beforeEach = function() {
34 sinon.stub(apiAuth,"init").callsFake(function(){});
35 sinon.stub(apiEditor,"init").callsFake(function(){
36 var app = express();
37 app.get("/editor",function(req,res) { res.status(200).end(); });
38 return app;
39 });
40 sinon.stub(apiAdmin,"init").callsFake(function(){
41 var app = express();
42 app.get("/admin",function(req,res) { res.status(200).end(); });
43 return app;
44 });
45 sinon.stub(apiAuth,"login").callsFake(function(req,res){
46 res.status(200).end();
47 });
48 };
49 var afterEach = function() {
50 apiAuth.init.restore();
51 apiAuth.login.restore();

Callers 15

registry_spec.jsFile · 0.85
installer_spec.jsFile · 0.85
plugins_spec.jsFile · 0.85
index_spec.jsFile · 0.85
sessions_spec.jsFile · 0.85
settings_spec.jsFile · 0.85
library_spec.jsFile · 0.85
index_spec.jsFile · 0.85
authCache_spec.jsFile · 0.85
index_spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected