5180 fichiers 38.5 Mo 0 téléchargements 303 vues mis à jour il y a 6 heures ui
nitro-v36-with-renderer-v36 / src / hooks / rooms / widgets / useFurniPickupGuard.test.ts
useFurniPickupGuard.test.ts 1.1 Ko Télécharger le fichier
/* @vitest-environment jsdom */
import { describe, expect, it } from 'vitest';
import { BUILDERS_CLUB_FURNI_ID_MIN, TEMPORARY_FURNI_ID_MAX } from '../../../api/utils/FurniIdBand';
import { needsWarehouseConfirm } from './useFurniPickupGuard';

describe('needsWarehouseConfirm (official pickupObjectWithConfirmation)', () => {
    it('asks before picking up a Builders Club furni that is not in the warehouse', () => {
        expect(needsWarehouseConfirm(BUILDERS_CLUB_FURNI_ID_MIN, false, true)).toBe(true);
        expect(needsWarehouseConfirm(2147483647, undefined, true)).toBe(true);
    });

    it('picks up a warehouse furni straight away', () => {
        expect(needsWarehouseConfirm(BUILDERS_CLUB_FURNI_ID_MIN + 3, true, true)).toBe(false);
    });

    it('never asks for normal or temporary furni, or with the Builders Club catalogue off', () => {
        expect(needsWarehouseConfirm(1234, false, true)).toBe(false);
        expect(needsWarehouseConfirm(TEMPORARY_FURNI_ID_MAX, false, true)).toBe(false);
        expect(needsWarehouseConfirm(BUILDERS_CLUB_FURNI_ID_MIN, false, false)).toBe(false);
    });
});
15Sujets
1Dépôts
20Membres
2En 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