mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix typ0
This commit is contained in:
parent
0d79dd91d8
commit
d3063073b3
@ -13,7 +13,7 @@ test('should work without state', (t) => {
|
|||||||
const store = new EventEmitter();
|
const store = new EventEmitter();
|
||||||
const metrics = new UnleashClientMetrics(store);
|
const metrics = new UnleashClientMetrics(store);
|
||||||
|
|
||||||
t.truthy(metrics.getAppsWitToggles());
|
t.truthy(metrics.getAppsWithToggles());
|
||||||
t.truthy(metrics.getTogglesMetrics());
|
t.truthy(metrics.getTogglesMetrics());
|
||||||
|
|
||||||
metrics.destroy();
|
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);
|
const togglesForApp = metrics.getSeenTogglesByAppName(appName);
|
||||||
|
|
||||||
t.truthy(appToggles.length === 1);
|
t.truthy(appToggles.length === 1);
|
||||||
|
@ -34,7 +34,7 @@ module.exports = class UnleashClientMetrics {
|
|||||||
clientMetricsStore.on('metrics', (m) => this.addPayload(m));
|
clientMetricsStore.on('metrics', (m) => this.addPayload(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppsWitToggles () {
|
getAppsWithToggles () {
|
||||||
const apps = [];
|
const apps = [];
|
||||||
Object.keys(this.apps).forEach(appName => {
|
Object.keys(this.apps).forEach(appName => {
|
||||||
const seenToggles = Object.keys(this.apps[appName].seenToggles);
|
const seenToggles = Object.keys(this.apps[appName].seenToggles);
|
||||||
|
@ -16,7 +16,7 @@ module.exports = function (app, config) {
|
|||||||
const metrics = new ClientMetrics(clientMetricsStore);
|
const metrics = new ClientMetrics(clientMetricsStore);
|
||||||
|
|
||||||
app.get('/client/seen-toggles', (req, res) => {
|
app.get('/client/seen-toggles', (req, res) => {
|
||||||
const seenAppToggles = metrics.getAppsWitToggles();
|
const seenAppToggles = metrics.getAppsWithToggles();
|
||||||
res.json(seenAppToggles);
|
res.json(seenAppToggles);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user