mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
fix typ0
This commit is contained in:
parent
a5d1e4eb0c
commit
94ee490e0d
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user