5180 fichiers 38.5 Mo 0 téléchargements 479 vues mis à jour il y a 7 heures ui
nitro-v36-with-renderer-v36 / src / components / room / widgets / furniture / chestUpgradeQuantity.test.ts
chestUpgradeQuantity.test.ts 597 o Télécharger le fichier
import { describe, expect, it } from 'vitest';
import { clampUpgradeQuantity } from './chestUpgradeQuantity';

describe('clampUpgradeQuantity', () => {
    it('keeps a pick that still fits', () => {
        expect(clampUpgradeQuantity(3, 8, 10)).toBe(3);
    });

    it('lowers a pick to the upgrades left after a purchase', () => {
        expect(clampUpgradeQuantity(5, 2, 10)).toBe(2);
    });

    it('never goes above the per-purchase limit or below one', () => {
        expect(clampUpgradeQuantity(12, 20, 10)).toBe(10);
        expect(clampUpgradeQuantity(4, 0, 10)).toBe(1);
    });
});
15Sujets
1Dépôts
20Membres
3En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser