Comparing version 2.0.0-alpha to 2.0.0
@@ -90,3 +90,3 @@ /** | ||
if(getFeatures) { | ||
reloadInverval = setInterval(self.reload, self._reloadRate); | ||
reloadInverval = setInterval(self.reload, self._reloadRate); | ||
} | ||
@@ -131,3 +131,3 @@ } | ||
/** | ||
* Check if a user has some given feature, and returns a boolean. | ||
* Check if a user has some given feature, and returns a boolean. | ||
* Returns null if the feature does not exist. | ||
@@ -162,3 +162,3 @@ * @param {Object} user The User object that criterial will check against. | ||
* @param {Object} user The User object that criterial will check against. | ||
* @param {Object} flags A collection of overrides | ||
* @param {Object} flags A collection of overrides | ||
* [@deprecated this flag will be removed soon] | ||
@@ -251,3 +251,3 @@ * @return {Object} The collection of all features and their availability. | ||
// remove | ||
case '1': | ||
case '-1': | ||
delete flags[name]; | ||
@@ -281,7 +281,7 @@ actionName = 'removed'; | ||
// Express Middleware | ||
app.use(_express_middleware); | ||
app.use(this._express_middleware); | ||
// Manual Flipping Route | ||
app.get('/fflip/:name/:action', _express_route); | ||
app.get('/fflip/:name/:action', this._express_route); | ||
}, | ||
}; | ||
}; |
@@ -6,3 +6,3 @@ { | ||
"licence": "MIT", | ||
"version": "2.0.0-alpha", | ||
"version": "2.0.0", | ||
"main": "lib/fflip", | ||
@@ -9,0 +9,0 @@ "repository": "FredKSchott/fflip", |
@@ -44,3 +44,3 @@ 'use strict'; | ||
}, | ||
fClosed: { | ||
fClosed: { | ||
criteria: { | ||
@@ -207,2 +207,6 @@ c1: false | ||
}; | ||
this.appMock = { | ||
use: sandbox.spy(), | ||
get: sandbox.spy() | ||
}; | ||
}); | ||
@@ -289,2 +293,12 @@ | ||
it('should mount express middleware into provided app', function() { | ||
fflip.express(this.appMock); | ||
assert.ok(this.appMock.use.calledWith(fflip._express_middleware)); | ||
}); | ||
it('should add GET route for manual feature flipping into provided app', function() { | ||
fflip.express(this.appMock); | ||
assert.ok(this.appMock.get.calledWith('/fflip/:name/:action', fflip._express_route)); | ||
}); | ||
}); | ||
@@ -347,3 +361,3 @@ | ||
// }); | ||
// it('should return a 400 error if action is invalid', function() { | ||
@@ -355,3 +369,3 @@ // request.get('/fflip/fOpen/5').expect(400, function(err){ | ||
// }); | ||
// it('should return a 200 sucess if request was valid', function() { | ||
@@ -358,0 +372,0 @@ // request.get('/fflip/fOpen/1').expect(400, function(err){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
27544
626
1
7994