Align GitHub Copilot quota usage with AI credits

This commit is contained in:
Jakub Syty
2026-08-14 15:59:33 +02:00
parent fe1f6130d6
commit dcf02f13a1
17 changed files with 97 additions and 20 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'bun:test';
import { clampPercent, formatPercent } from './utils';
import { clampPercent, formatPercent, formatWindowLabel } from './utils';
describe('quota utils', () => {
test('treats non-finite percentages as missing', () => {
@@ -10,4 +10,9 @@ describe('quota utils', () => {
expect(formatPercent(Infinity)).toBe('-');
expect(formatPercent(-Infinity)).toBe('-');
});
test('labels Copilot usage as AI Credits without changing generic premium usage', () => {
expect(formatWindowLabel('premium')).toBe('Premium Interactions');
expect(formatWindowLabel('premium_interactions')).toBe('AI Credits');
});
});