<commit_before>describe('Test', function () {
  describe('should pass', function () {
    it('should equal 2', function () {
      expect(1 + 1).to.equal(2);
    });

    it('should not equal 3', function () {
      expect(1 + 1).to.not.equal(3);
    });

    it('should equal 3', function () {
      expect(1 + 1 + 1).to.equal(3);
    });
  });
});<commit_msg>Additions to tests<commit_after>// positioning test resilts
$( "#mocha" ).position({
	my: "left top",
	at: "right+10 top",
	of: "#board"
});

// can't find how to do async testing correctly so will do this:
var wait = {
	attempts: 100,
	interval: 20,

	repeat: function (done, expectation, test, attempt) {
		if(!attempt) attempt = 1;

		if(test() == expectation) {
			done();
		}else{
			attempt++;
			if(attempt > this.attempts) {
				done('Timeout inside wait.repeat');
			}else{
				setTimeout(this.repeat.bind(this, done, expectation, test, attempt), this.interval);
			}
		}
	},

	appear: function (el, done) {
		this.repeat(done, true, function () {
			return $(el).is(':visible');
		});
	},

	disappear: function (el, done) {
		this.repeat(done, false, function () {
			return $(el).is(':visible');
		});
	}
};

describe('Testing game', function () {
	describe('Game', function () {
		it('should show welcome window', function () {
			expect($('#game-select-window').is(':visible')).to.equal(true);
		});

		it('should close welcome window after starting 2P game', function () {
			$('#game-select-mode-2p-local').click();
			expect($('#game-select-window').is(':visible')).to.equal(false);
		});

		it('should show message container', function (done) {
			wait.appear('.message-container', done);
		});

		it('should show message with place puck message', function () {
			expect($('.message-container .message').text()).to.contain('puck');
		});

		it('should hide message when we close it', function (done) {
			$('i.fa.fa-times-circle.fa-lg.close-message').click();
			wait.disappear('.message-container', done);
		});
	});
});
{'fraction_non_alphanumeric': 0.206, 'fraction_numerical': 0.0115, 'mean_word_length': 3.6426914153132253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2681535', 'n_tokens_mistral': 739, 'n_tokens_neox': 651, 'n_words': 155}