<commit_before>package org.ltky.mocha;

import org.apache.log4j.Logger;
import org.junit.Test;
import org.ltky.EmbeddedJetty;

import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;


/**
 * Created by laastine on 18/07/15.
 */
public class MochaTestRunnerTest {
    private static final Logger LOGGER = Logger.getLogger(MochaTestRunnerTest.class);

    @Test
    public void mochaTest() throws Exception {
        EmbeddedJetty.startJetty();
        String[] cmd = {"../../../node_modules/mocha-phantomjs/bin/mocha-phantomjs", "-R", "spec", "http://localhost:" + EmbeddedJetty.PORT + "/lukkarimaatti/test/runner.html"};
        Process ps = Runtime.getRuntime().exec(cmd);
        assertTrue(ps.waitFor(60, TimeUnit.SECONDS));
        assertEquals(0, ps.exitValue());
        EmbeddedJetty.stopJetty();
    }

}<commit_msg>MochaTestRunnerTest works<commit_after>package org.ltky.mocha;

import org.junit.Test;
import org.ltky.JettyTestRunner;

import java.util.concurrent.TimeUnit;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;


/**
 * Created by laastine on 18/07/15.
 */
public class MochaTestRunnerTest {

    @Test
    public void mochaTest() throws Exception {
        JettyTestRunner.startJetty();
        String[] cmd = {"node_modules/mocha-phantomjs/bin/mocha-phantomjs", "-R", "spec", "http://localhost:" + JettyTestRunner.PORT + "/lukkarimaatti/test/runner.html"};
        Process ps = Runtime.getRuntime().exec(cmd);
        assertTrue(ps.waitFor(10, TimeUnit.SECONDS));
        assertEquals(0, ps.exitValue());
        JettyTestRunner.stopJetty();
    }

}
{'fraction_non_alphanumeric': 0.13827893175074185, 'fraction_numerical': 0.011275964391691394, 'mean_word_length': 3.722689075630252, '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': '5559052', 'n_tokens_mistral': 573, 'n_tokens_neox': 534, 'n_words': 99}