bd sync: 2026-01-12 16:57:37
This commit is contained in:
@@ -15,8 +15,7 @@ const t = (key: string, options?: Record<string, unknown> | string) => {
|
||||
return template
|
||||
.replace('{{used}}', String(options?.used ?? '{{used}}'))
|
||||
.replace('{{limit}}', String(options?.limit ?? '{{limit}}'))
|
||||
.replace('{{remaining}}', String(options?.remaining ?? '{{remaining}}'))
|
||||
.replace('{{count}}', String(options?.count ?? '{{count}}'));
|
||||
.replace('{{remaining}}', String(options?.remaining ?? '{{remaining}}'));
|
||||
};
|
||||
|
||||
describe('packageSummary helpers', () => {
|
||||
@@ -54,12 +53,6 @@ describe('packageSummary helpers', () => {
|
||||
expect(result[0].value).toBe('30 of 120 remaining');
|
||||
});
|
||||
|
||||
it('falls back to remaining count when remaining exceeds limit', () => {
|
||||
const result = getPackageLimitEntries({ max_photos: 120, remaining_photos: 180 }, t);
|
||||
|
||||
expect(result[0].value).toBe('Remaining 180');
|
||||
});
|
||||
|
||||
it('formats event usage copy', () => {
|
||||
const result = formatEventUsage(3, 10, t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user