diff --git a/lib/client-metrics/client-metrics.test.js b/lib/client-metrics/client-metrics.test.js index 53da11c9dd..f80863a4c4 100644 --- a/lib/client-metrics/client-metrics.test.js +++ b/lib/client-metrics/client-metrics.test.js @@ -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); diff --git a/lib/client-metrics/index.js b/lib/client-metrics/index.js index 9b6b40bd6b..26189e61fd 100644 --- a/lib/client-metrics/index.js +++ b/lib/client-metrics/index.js @@ -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); diff --git a/lib/routes/metrics.js b/lib/routes/metrics.js index d5075fa1fd..1e420a9b45 100644 --- a/lib/routes/metrics.js +++ b/lib/routes/metrics.js @@ -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); });