<commit_before>var tennis;

module( "Tennis Tests", {
  setup: function() {
    tennis = new Tennis();
  },
  teardown: function() {
    // clean up after each test
  }
});

    test("should have two players", function() {
        ok(tennis.players.hasOwnProperty('player1'));
        ok(tennis.players.hasOwnProperty('player2'));
    });
    
//    test("should start with both players scoring 0", function () {
//        ok(tennis.players.player1.score).toEqual(0);
//        ok(tennis.players.player2.score).toEqual(0);
//    });

    test("should be deuce if both players have 40 points", function () {
        tennis.playGame([1,2,1,2,1,2]);
        ok(tennis.isAtDeuce());
    });
    
    test("should not be deuce if first player has 40 and second has 30 points", function () {
        tennis.playGame([1, 2, 1, 2, 1]);
        ok(!tennis.isAtDeuce());
    });<commit_msg>More tests converted to qunit<commit_after>var tennis;

module( "Tennis Tests", {
  setup: function() {
    tennis = new Tennis();
  },
  teardown: function() {
    // clean up after each test
  }
});

test("should have two players", function() {
	ok(tennis.players.hasOwnProperty('player1'));
	ok(tennis.players.hasOwnProperty('player2'));
});
    
test("should start with both players scoring 0", function (assert) {
	assert.equal(tennis.players.player1.score, 0);
	assert.equal(tennis.players.player2.score, 0);
});

test("should be deuce if both players have 40 points", function () {
	tennis.playGame([1,2,1,2,1,2]);
	ok(tennis.isAtDeuce());
});
    
test("should not be deuce if first player has 40 and second has 30 points", function () {
	tennis.playGame([1, 2, 1, 2, 1]);
	ok(!tennis.isAtDeuce());
});

var player;

module( "Player Tests", {
  setup: function() {
    player = new Player();
  },
  teardown: function() {
    // clean up after each test
  }
});

test("should have score of 15 after winning a point", function ( assert ) {
        player.winPoint();
        assert.equal(player.score,15);
    });
    
    test("should have score of 30 after winning 2 points", function ( assert ) {
        player.winPoint();
        player.winPoint();
        assert.equal(player.score,30);
    });
    
    test("should have score of 40 after winning 3 points", function ( assert ) {
        player.winPoint();
        player.winPoint();
        player.winPoint();
        assert.equal(player.score,40);
    });
    
    test("should be the winner after winning 4 points", function () {
        player.winPoint();
        player.winPoint();
        player.winPoint();
        player.winPoint();
        ok(player.hasWon);
    });
{'fraction_non_alphanumeric': 0.1573119511263841, 'fraction_numerical': 0.024054982817869417, 'mean_word_length': 2.8988095238095237, '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': '6772748', 'n_tokens_mistral': 856, 'n_tokens_neox': 827, 'n_words': 214}