mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 05:30:01 +00:00
fix missing argument
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
describe("event-processor", () => {
|
||||
describe("active", () => {
|
||||
it("", () => {});
|
||||
});
|
||||
|
||||
describe("validate", () => {
|
||||
it("", () => {});
|
||||
});
|
||||
});
|
||||
@@ -76,15 +76,15 @@ function validate(
|
||||
for (const monitor of monitors) {
|
||||
const progress = mapProgressByName(status);
|
||||
|
||||
const measurements = monitor.measure(action, progress);
|
||||
results.push(...measurements);
|
||||
const measured = monitor.measure(action, progress);
|
||||
results.push(...measured);
|
||||
|
||||
// modify copy produced by filter to avoid reallocation
|
||||
for (const m of measurements) {
|
||||
for (const m of measured) {
|
||||
progress.set(m.achievement.name, m.achievement.value);
|
||||
}
|
||||
|
||||
results.push(...monitor.earn(progress));
|
||||
results.push(...monitor.earn(measured, progress));
|
||||
}
|
||||
|
||||
// deliver results as a stream containing individual records to maintain
|
||||
|
||||
@@ -38,7 +38,7 @@ const ThreeItemsCreatedValidator = {
|
||||
const value = 1 + (progress.get(ItemCreatedProgress) ?? 0);
|
||||
return [progressEvent(ItemCreatedProgress, value)];
|
||||
},
|
||||
earn(progress) {
|
||||
earn(_measured, progress) {
|
||||
const value = progress.get(ItemCreatedProgress) ?? 0;
|
||||
return value >= 3 ? [earnedEvent(ItemCreatedAchievement)] : [];
|
||||
},
|
||||
@@ -57,7 +57,7 @@ const FiveItemsCreatedValidator = {
|
||||
const value = 1 + (progress.get(ItemCreatedProgress) ?? 0);
|
||||
return [progressEvent(ItemCreatedProgress, value)];
|
||||
},
|
||||
earn(progress) {
|
||||
earn(_measured, progress) {
|
||||
const value = progress.get(ItemCreatedProgress) ?? 0;
|
||||
return value >= 5 ? [earnedEvent(ItemCreatedAchievement)] : [];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user