<commit_before>#!/bin/bash
echo "Running Javascript tests"

OUTPUTFILE=$(mktemp /tmp/javascript.XXXX)

bundle exec rake konacha:run \
 | grep -vE '^(Compiled|method=GET|Served asset)' \
 | tee "$OUTPUTFILE"

if ! grep ', 0 failed' $OUTPUTFILE > /dev/null
then
        exit 1
fi

exit<commit_msg>Added check for random failing (mainly for debugging)<commit_after>#!/bin/bash
echo "Running Javascript tests"

OUTPUTFILE=$(mktemp /tmp/javascript.XXXX)

bundle exec rake konacha:run \
 | grep -vE '^(Compiled|method=GET|Served asset)' \
 | tee "$OUTPUTFILE"

if grep 'Timed out waiting for response to' $OUTPUTFILE > /dev/null
then
  echo detected random fail
fi

if ! grep ', 0 failed' $OUTPUTFILE > /dev/null
then
        exit 1
fi

exit
{'fraction_non_alphanumeric': 0.12244897959183673, 'fraction_numerical': 0.005442176870748299, 'mean_word_length': 4.041095890410959, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2473268', 'n_tokens_mistral': 268, 'n_tokens_neox': 240, 'n_words': 78}