1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
This commit is contained in:
sveisvei 2016-12-05 13:26:53 +01:00
parent a5d1e4eb0c
commit 94ee490e0d
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ test('should work without state', (t) => {
const store = new EventEmitter();
const metrics = new UnleashClientMetrics(store);
t.truthy(metrics.getAppsWitToggles());
t.truthy(metrics.getAppsWithToggles());
t.truthy(metrics.getTogglesMetrics());
metrics.destroy();
@ -131,7 +131,7 @@ test('should build up list of seend toggles when new metrics arrives', t => {
},
});
const appToggles = metrics.getAppsWitToggles();
const appToggles = metrics.getAppsWithToggles();
const togglesForApp = metrics.getSeenTogglesByAppName(appName);
t.truthy(appToggles.length === 1);

View File

@ -34,7 +34,7 @@ module.exports = class UnleashClientMetrics {
clientMetricsStore.on('metrics', (m) => this.addPayload(m));
}
getAppsWitToggles () {
getAppsWithToggles () {
const apps = [];
Object.keys(this.apps).forEach(appName => {
const seenToggles = Object.keys(this.apps[appName].seenToggles);

View File

@ -16,7 +16,7 @@ module.exports = function (app, config) {
const metrics = new ClientMetrics(clientMetricsStore);
app.get('/client/seen-toggles', (req, res) => {
const seenAppToggles = metrics.getAppsWitToggles();
const seenAppToggles = metrics.getAppsWithToggles();
res.json(seenAppToggles);
});