<commit_before>#!/bin/bash

#Exit when any of the commands fails
set -e

echo "Setting up DB"
mongo test/setup/setupdb.js


if [ "$TRAVIS" = "" ]; then
    echo "Starting test server"
    node app.js --server:port 3102 --database:name postest --admin:authenticate false &
    TESTPID=$(echo $!)
    echo "Test server started with pid $TESTPID"
    #Alway stop the server when the script exits
    trap "kill $TESTPID" EXIT
fi

echo "Running mocha tests"
./node_modules/.bin/mocha test/model/*.js
<commit_msg>Added empty row<commit_after>#!/bin/bash

#Exit when any of the commands fails
set -e

echo "Setting up DB"
mongo test/setup/setupdb.js


if [ "$TRAVIS" = "" ]; then
    echo "Starting test server"
    node app.js --server:port 3102 --database:name postest --admin:authenticate false &
    TESTPID=$(echo $!)
    echo "Test server started with pid $TESTPID"
    #Alway stop the server when the script exits
    trap "kill $TESTPID" EXIT
fi


echo "Running mocha tests"
./node_modules/.bin/mocha test/model/*.js

{'fraction_non_alphanumeric': 0.11776251226692837, 'fraction_numerical': 0.007850834151128557, 'mean_word_length': 3.396551724137931, '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': '3566331', 'n_tokens_mistral': 358, 'n_tokens_neox': 332, 'n_words': 118}