<commit_before>#!/bin/sh -ex
# -e exits on any error; exit code is preserved

fail() {
    echo $2 >&2
    exit $1
}

# bail if selenium isn't running
ps aux | egrep -q '[j]ava.+selenium' || fail 9 'no selenium server, exiting'

# tests subdir
cd $(dirname $0)

# lint
../bin/mojito jslint -p

# unit tests
../tests/run.js test -u --reuseSession --path unit

# func tests
#../tests/run.js test -f --coverage --path func --reuseSession<commit_msg>run functional tests on travis<commit_after>#!/bin/sh -ex
# -e exits on any error; exit code is preserved

fail() {
    echo $2 >&2
    exit $1
}

# bail if selenium isn't running
ps aux | egrep -q '[j]ava.+selenium' || fail 9 'no selenium server, exiting'

# tests subdir
cd $(dirname $0)

# lint
../bin/mojito jslint -p

# unit tests
../tests/run.js test -u --reuseSession --path unit

# func tests
../tests/run.js test -f --path func --reuseSession
{'fraction_non_alphanumeric': 0.1527313266443701, 'fraction_numerical': 0.011148272017837236, 'mean_word_length': 2.8706896551724137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2920535', 'n_tokens_mistral': 346, 'n_tokens_neox': 323, 'n_words': 120}