<commit_before>var pokerCards = require('../../lib/poker-cards');

describe('poker-cards', function() {
    it('should set a card for a user if cards are not already shown', function() {
        expect(pokerCards.getAll()).toEqual({
            cards: {},
            show: false
        });

        pokerCards.setCard('foobar', 13);
        expect(pokerCards.getAll()).toEqual({
            cards: {
                'foobar': 13
            },
            show: false
        });
        pokerCards.reset();
    });

    it('should update the users card value', function() {
        pokerCards.setCard('heinz', 13);
        pokerCards.setCard('heinz', 8);
        expect(pokerCards.getAll()).toEqual({
            cards: {
                'heinz': 8
            },
            show: false
        })
    });
});<commit_msg>full specs for poker cards. the spec for getAll() is still missing though<commit_after>var pokerCards = require('../../lib/poker-cards');

describe('poker-cards', function() {
    it('should set a card for a user if cards are not already shown', function() {
        expect(pokerCards.getAll()).toEqual({
            cards: {},
            show: false
        });

        pokerCards.setCard('foobar', 13);
        expect(pokerCards.getAll()).toEqual({
            cards: {
                'foobar': 13
            },
            show: false
        });
        pokerCards.reset();
    });

    it('should update the users card value', function() {
        pokerCards.setCard('heinz', 13);
        pokerCards.setCard('heinz', 8);
        expect(pokerCards.getAll()).toEqual({
            cards: {
                'heinz': 8
            },
            show: false
        });
        pokerCards.reset();
    });

    it('should not set the users card if cards are already shown', function() {
        pokerCards.show = true;
        pokerCards.setCard('egon', 5);
        expect(pokerCards.getAll()).toEqual({
            cards: {},
            show: true
        });
        pokerCards.reset();
    });

    it('should remove a users card', function() {
        pokerCards.setCard('bernd', 40);
        pokerCards.removeCard('bernd');
        expect(pokerCards.getAll()).toEqual({
            cards: {},
            show: false
        });
        pokerCards.reset();
    });

    it('should reset the card status', function() {
        pokerCards.setCard('horst', 5);
        pokerCards.setCard('heinz', 13);
        pokerCards.setCard('egon', 8);
        pokerCards.show = true;
        pokerCards.reset();
        expect(pokerCards.getAll()).toEqual({
            cards: {},
            show: false
        });
    });
});
{'fraction_non_alphanumeric': 0.14981132075471698, 'fraction_numerical': 0.008679245283018867, 'mean_word_length': 1.7557172557172558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4014020', 'n_tokens_mistral': 784, 'n_tokens_neox': 771, 'n_words': 165}