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

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

bundle exec rake konacha:run 2>&1 \
 | 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<commit_msg>fixed konacha tests for now<commit_after>#!/bin/bash
echo "Running Javascript tests"

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

bundle exec rake  konacha:load_poltergeist konacha:run 2>&1 \
 | 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
{'fraction_non_alphanumeric': 0.12028985507246377, 'fraction_numerical': 0.005797101449275362, 'mean_word_length': 5.008695652173913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2213768', 'n_tokens_mistral': 248, 'n_tokens_neox': 223, 'n_words': 70}