<commit_before>var assert = require("assert")
var s = require('../services')
var gs = require("./data/game-state-example.json")

describe("player", function() {

    describe("#checkCard", function() {
        it("converts 7 to 7", function() {
            assert.equal( s.checkCard(7), 7 )
        })
        it("converts A to 14", function() {
            assert.equal( s.checkCard('A'), 14 )
        })
    })

    describe("#findPair", function() {
        it("finds pair", function() {
            assert.equal( s.findPair([1,2,3,3,4]), true )
        })
        it("ignores non-pair", function() {
            assert.equal( s.findPair([1,2,3,4,5]), false )
        })
    })

})<commit_msg>Write more tests for #testPair<commit_after>var assert = require("assert")
var s = require('../services')
var gs = require("./data/game-state-example.json")

describe("player", function() {

    describe("#checkCard", function() {
        it("converts 7 to 7", function() {
            assert.equal( s.checkCard(7), 7 )
        })
        it("converts A to 14", function() {
            assert.equal( s.checkCard('A'), 14 )
        })
    })

    describe("#findPair", function() {
        it("finds pair in hand", function() {
            assert.equal( s.findPair([2,2]), true )
        })
        it("ignores non-pair in hand", function() {
            assert.equal( s.findPair([2,3]), true )
        })
        it("finds pair", function() {
            assert.equal( s.findPair([1,2,3,3,4]), true )
        })
        it("finds aces in common", function() {
            assert.equal( s.findPair([14,14,1,2,3,3,4]), true )
        })
        it("ignores non-pair", function() {
            assert.equal( s.findPair([1,2,3,4,5]), false )
        })
    })

})
{'fraction_non_alphanumeric': 0.19020501138952164, 'fraction_numerical': 0.027904328018223234, 'mean_word_length': 2.165765765765766, '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': '195046', 'n_tokens_mistral': 577, 'n_tokens_neox': 554, 'n_words': 114}