Remove all conditional branches to call req.profiler

req.profiler is created in a middleware for all requests.
This commit is contained in:
Raul Ochoa
2017-03-30 20:31:53 +02:00
parent 1ca56fb81c
commit cad02bfad7
6 changed files with 26 additions and 54 deletions
@@ -26,12 +26,14 @@ describe('tile stats', function() {
var layergroupController = new LayergroupController();
var reqMock = {
profiler: { toJSONString:function() {} },
params: {
format: invalidFormat
}
};
var resMock = {
status: function() { return this; },
set: function() {},
json: function() {},
jsonp: function() {},
send: function() {}
@@ -54,12 +56,14 @@ describe('tile stats', function() {
}
});
var reqMock = {
profiler: { toJSONString:function() {} },
params: {
format: validFormat
}
};
var resMock = {
status: function() { return this; },
set: function() {},
json: function() {},
jsonp: function() {},
send: function() {}