Skip to content

Commit 5a979a2

Browse files
committed
test(usage): cover Plus as the 1x pool baseline
1 parent 5cf3302 commit 5a979a2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎packages/shared/src/usageLimits.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,18 @@ describe("pooled account columns", () => {
685685
now,
686686
);
687687
expect(zero!.windows[0]!.remainingPercent).toBe(40);
688+
// Plus has no multiplier in its label and is the 1x baseline.
689+
const [plus] = collectLimitPools(
690+
[
691+
{
692+
...account("a", [{ ...weekly, usedPercent: 100 }]),
693+
plan: "ChatGPT Pro 20x Subscription",
694+
},
695+
{ ...account("b", [{ ...weekly, usedPercent: 0 }]), plan: "ChatGPT Plus Subscription" },
696+
],
697+
now,
698+
);
699+
expect(plus!.windows[0]!.remainingPercent).toBe(5);
688700
});
689701

690702
it("falls back to weekly resets when no account reports a session", () => {

0 commit comments

Comments
 (0)