Add projects

This commit is contained in:
Alois 2026-08-24 00:10:41 +02:00
commit 8b607dd700
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
1802 changed files with 503346 additions and 2 deletions

View file

@ -0,0 +1,21 @@
import { describe, expect, test } from 'vitest';
import { getNextAntigravityCountdownUpdateDelay } from '@/features/quota/providers/antigravity/countdown';
const MINUTE_MS = 60_000;
describe('Antigravity quota countdown scheduling', () => {
test('updates at the next rounded-minute boundary', () => {
expect(getNextAntigravityCountdownUpdateDelay([10.5 * MINUTE_MS], 0)).toBe(30_000);
expect(getNextAntigravityCountdownUpdateDelay([10 * MINUTE_MS], 0)).toBe(MINUTE_MS);
});
test('uses the earliest boundary across quota buckets', () => {
expect(getNextAntigravityCountdownUpdateDelay([10.75 * MINUTE_MS, 3.25 * MINUTE_MS], 0)).toBe(
15_000
);
});
test('stops scheduling after all reset times expire', () => {
expect(getNextAntigravityCountdownUpdateDelay([0, Number.NaN], MINUTE_MS)).toBeNull();
});
});