<commit_before>describe('In level 4 ', function () {
    var console, game, player_1, player_2, weapon;

    beforeEach(function () {
        console = {log: null};
        spyOn(console, 'log');

        weapon = new Weapon('优质毒剑', 2, 'medium');
        player_1 = new Player('张三', 10, 8, 'soldier');
        player_2 = new Player('李四', 20, 9, 'normal');
        game = new Game(console, player_1, player_2);
    });

    it('weapon should have effect property', function () {
        expect(weapon.effect).toBeTruthy();
    });

    it('abnormal player should be able to wear shield', function () {
        player_1.setWeapon(weapon);
        expect(player_1.weapon.name).toEqual(weapon.name);
        player_2.setWeapon(weapon);
        expect(player_2.weapon.type).toEqual('null');
    });

    it('assassin can wear short and medium weapon', function () {
        var player = new Player('', 0, 0, 'assassin');
        var short_weapon = new Weapon('short_weapon', 0, 'short');
        var medium_weapon = new Weapon('medium_weapon', 0, 'medium');
        var long_weapon = new Weapon('long_weapon', 0, 'long');
        player.setWeapon(short_weapon);
        expect(player.weapon.name).toEqual('short_weapon');
        player.removeWeapon();
        player.setWeapon(medium_weapon);
        expect(player.weapon.name).toEqual('medium_weapon');
        player.removeWeapon();
        player.setWeapon(long_weapon);
        expect(player.weapon.type).toEqual('null');
    });

    it('', function () {

    });

    it('', function () {

    });

    it('', function () {

    });
<commit_msg>补充测试 第五问<commit_after>describe('In level 5 ', function () {
    var console, game, player_1, player_2, weapon;

    beforeEach(function () {
        console = {log: null};
        spyOn(console, 'log');

        weapon = new Weapon('优质毒剑', 2, 'medium');
        player_1 = new Player('张三', 10, 8, 'soldier');
        player_2 = new Player('李四', 20, 9, 'normal');
        game = new Game(console, player_1, player_2);
    });

    it('weapon should have effect property', function () {
        expect(weapon.effect).toBeTruthy();
    });

    it('abnormal player should be able to wear shield', function () {
        player_1.setWeapon(weapon);
        expect(player_1.weapon.name).toEqual(weapon.name);
        player_2.setWeapon(weapon);
        expect(player_2.weapon.type).toEqual('null');
    });

    it('assassin can wear short and medium weapon', function () {
        var player = new Player('', 0, 0, 'assassin');
        var short_weapon = new Weapon('short_weapon', 0, 'short');
        var medium_weapon = new Weapon('medium_weapon', 0, 'medium');
        var long_weapon = new Weapon('long_weapon', 0, 'long');
        player.setWeapon(short_weapon);
        expect(player.weapon.name).toEqual('short_weapon');
        player.removeWeapon();
        player.setWeapon(medium_weapon);
        expect(player.weapon.name).toEqual('medium_weapon');
        player.removeWeapon();
        player.setWeapon(long_weapon);
        expect(player.weapon.type).toEqual('null');
    });

    it('soldier can wear medium weapon', function () {
        var player = new Player('', 0, 0, 'soldier');
        var short_weapon = new Weapon('short_weapon', 0, 'short');
        var medium_weapon = new Weapon('medium_weapon', 0, 'medium');
        var long_weapon = new Weapon('long_weapon', 0, 'long');
        player.setWeapon(short_weapon);
        expect(player.weapon.type).toEqual('null');
        player.removeWeapon();
        player.setWeapon(medium_weapon);
        expect(player.weapon.name).toEqual('medium_weapon');
        player.removeWeapon();
        player.setWeapon(long_weapon);
        expect(player.weapon.type).toEqual('null');
    });

    it('knight can wear medium and long weapon', function () {
        var player = new Player('', 0, 0, 'soldier');
        var short_weapon = new Weapon('short_weapon', 0, 'short');
        var medium_weapon = new Weapon('medium_weapon', 0, 'medium');
        var long_weapon = new Weapon('long_weapon', 0, 'long');
        player.setWeapon(short_weapon);
        expect(player.weapon.type).toEqual('null');
        player.removeWeapon();
        player.setWeapon(medium_weapon);
        expect(player.weapon.name).toEqual('medium_weapon');
        player.removeWeapon();
        player.setWeapon(long_weapon);
        expect(player.weapon.name).toEqual('long_weapon');
    });

    it('normal one can not wear weapon', function () {
        var player = new Player('', 0, 0, 'normal');
        
    });

    it('', function () {

    });

    it('', function () {

    });

{'fraction_non_alphanumeric': 0.15668899935163172, 'fraction_numerical': 0.012535119948130538, 'mean_word_length': 2.859883236030025, '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': '1638504', 'n_tokens_mistral': 1507, 'n_tokens_neox': 1463, 'n_words': 303}