Align GitHub Copilot quota usage with AI credits
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user