aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2019-12-11 09:40:22 -0500
committerKevin J Hoerr <kjhoerr@protonmail.com>2019-12-11 09:40:22 -0500
commit3ae4f9352ee73a21581735883b4049327dce07bf (patch)
tree6c24d2e14cf37474b6580d4b31cc4ec5ac215742 /public
parente51ba6220576172b39d1a96a9ab4dfba87769428 (diff)
downloadao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.tar.gz
ao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.tar.bz2
ao-coverage-3ae4f9352ee73a21581735883b4049327dce07bf.zip
Add Jest to handle unit and integration testing
Wrote a couple of initial unit tests for some of the logic-heavy points in the application, being logger.ts and formats.ts. Evidently colorize() causes an error when transforming on the Format object that's returned. Since that is specific to the Console transport anyways, I just moved it to the transport, since the unit test was only testing the passed label in the returned Formats object. Also the bash template has some issues that I didn't test (oops), so those are fixed now.
Diffstat (limited to 'public')
-rw-r--r--public/bash.template4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/bash.template b/public/bash.template
index bfaaae2..09831b7 100644
--- a/public/bash.template
+++ b/public/bash.template
@@ -12,7 +12,7 @@ format="tarpaulin"
report=""
token="$COV_TOKEN"
-if [[ "$CI" -eq "drone" ]]; then
+if [[ "$CI" == "drone" ]]; then
commit="$DRONE_COMMIT"
branch="$DRONE_BRANCH"
repo="$DRONE_REPO"
@@ -22,7 +22,7 @@ else
repo="$VCS_REPO"
fi
-if [[ "$format" -eq "tarpaulin" ]]; then
+if [[ "$format" == "tarpaulin" ]]; then
report="${REPORT_FILE:-tarpaulin-report.html}"
fi