<commit_before>    'use strict';

    import GameRoom from '../../../server/controllers/game_room.server.controller';
    import {max_players, min_players} from '../../../server/controllers/game_room.server.controller';
    import {
        q
    }
    from '../../../server/controllers/queue.server.controller';

    var should = require('should');
    var SocketMock = require('socket-io-mock');
    var socketPort = 3006;
    var socketURL = 'http://0.0.0.0:';
    var ioserver = require('socket.io').listen(socketPort);
    q.setIO(ioserver);

    var getMockSockets = function(num_players) {
        var sockets = [];
        for (var i = 0; i < num_players; i++) {
            sockets[i] = new SocketMock();
            sockets[i].request = {
                user: {
                    username: 'user' + i
                }
            };
        }
        return sockets;
    };

    describe('Game Room States Tests', function() {
        // initialize a game room

        describe('A. Public Game Room: Max Number of Player', function() {
            var TheGameRoom, players;

            it('A1. Should be able to create a game room with max number of players', function(done) {
            	players = getMockSockets(max_players);
            	TheGameRoom = new GameRoom(players, true, 'randomly_generated_id');
            	TheGameRoom.getNumPlayers().should.be.exactly(max_players);
            	done();
            });

            it('A2. Should be in the ESTABLISHING state after GameRoom initialization', function(done) {
                TheGameRoom.getStateName().should.be.exactly('ESTABLISHING');
                done();
            }); 

            it('A3. Should have a game_room_id property equal to the room\'s ID for every socket', function(done) {
                for (let socket of players) {
                    socket.game_room_id.should.be.exactly('randomly_generated_id');
                }
                done();
            });
        });
    });
<commit_msg>added should not have winner yet test to first game w/ max players (I-A4)<commit_after>    'use strict';

    import GameRoom from '../../../server/controllers/game_room.server.controller';
    import {max_players, min_players} from '../../../server/controllers/game_room.server.controller';
    import {
        q
    }
    from '../../../server/controllers/queue.server.controller';

    var should = require('should');
    var SocketMock = require('socket-io-mock');
    var socketPort = 3006;
    var socketURL = 'http://0.0.0.0:';
    var ioserver = require('socket.io').listen(socketPort);
    q.setIO(ioserver);

    var getMockSockets = function(num_players) {
        var sockets = [];
        for (var i = 0; i < num_players; i++) {
            sockets[i] = new SocketMock();
            sockets[i].request = {
                user: {
                    username: 'user' + i
                }
            };
        }
        return sockets;
    };

    describe('Game Room States Tests', function() {
        // initialize a game room

        describe('I. Public Game Room: Max Number of Player', function() {
            var TheGameRoom, players;

            describe('I-A. First Game', function() {
                it('I-A1. Should be able to create a game room with max number of players', function(done) {
                	players = getMockSockets(max_players);
                	TheGameRoom = new GameRoom(players, true, 'randomly_generated_id');
                	TheGameRoom.getNumPlayers().should.be.exactly(max_players);
                	done();
                });

                it('I-A2. Should be in the ESTABLISHING state after GameRoom initialization', function(done) {
                    TheGameRoom.getStateName().should.be.exactly('ESTABLISHING');
                    done();
                }); 

                it('I-A3. Should have a game_room_id property equal to the room\'s ID for every socket', function(done) {
                    for (let socket of players) {
                        socket.game_room_id.should.be.exactly('randomly_generated_id');
                    }
                    done();
                });

                it('I-A4. Should not have a winner yet', function(done) {
                    TheGameRoom.getWinner().should.be.exactly('No winner yet');
                    done();
                });
            });
        });
    });

{'fraction_non_alphanumeric': 0.12664847658026376, 'fraction_numerical': 0.005911778080945885, 'mean_word_length': 1.7322981366459627, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6743841', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1190, 'n_words': 297}