Skip to content

Commit 9cfeb73

Browse files
committed
Surface and group test runs
1 parent 691a6fa commit 9cfeb73

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

bin/run-tests.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ cp -R ${fixtures_dir}/* "${tmp_fixtures_dir}"
2828

2929
# Iterate over all test directories
3030
for test_file in $(find "${tmp_fixtures_dir}" -name '*.spec.js'); do
31-
echo "👁️ ${test_file}"
31+
32+
echo "::group::Testing 👁️ ${test_file}"
3233

3334
slug=$(basename "${test_file}" | sed s/.spec.js$//)
3435
test_dir=$(dirname "${test_file}")
@@ -43,14 +44,17 @@ for test_file in $(find "${tmp_fixtures_dir}" -name '*.spec.js'); do
4344
bin/run.sh "${slug}" "${test_dir_path}" "${test_dir_path}"
4445

4546
if test -f $expected_results_file_path; then
46-
echo "${slug}/${test_dir_name}: comparing results.json to expected_results.json"
47+
touch "${results_file_path}" # ensure it exists
48+
echo "${slug}/${test_dir_name}: 🚨 comparing results.json to expected_results.json"
4749
diff "${results_file_path}" "${expected_results_file_path}"
4850
fi;
4951

5052
if [ $? -ne 0 ]; then
5153
echo "diff \"${results_file_path}\" \"${expected_results_file_path}\" reported $?"
5254
exit_code=1
5355
fi
56+
57+
echo "::endgroup::"
5458
done
5559

5660
exit ${exit_code}

0 commit comments

Comments
 (0)