summaryrefslogtreecommitdiff
path: root/date-fns/scripts/test/smoke.sh
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/scripts/test/smoke.sh')
-rwxr-xr-xdate-fns/scripts/test/smoke.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/date-fns/scripts/test/smoke.sh b/date-fns/scripts/test/smoke.sh
new file mode 100755
index 0000000..b718edd
--- /dev/null
+++ b/date-fns/scripts/test/smoke.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# The script runs the smoke test against every supported builder configuration.
+#
+# It's a part of the test process.
+
+dir="$(pwd)/examples"
+
+ok_message="\n\033[0;32m✓ OK!\033[0m\n"
+error_message="\n\033[0;31m✗ Something went wrong!\033[0m\n"
+
+cd "$dir" || exit 1
+
+for example in `ls`
+do
+ printf "\n\033[0;32mTesting $example...\033[0m\n\n"
+ cd "$example" || exit 1
+ yarn
+ yarn build
+ yarn test || (printf "$error_message" && exit 1) || exit 1
+ cd - || exit 1
+ printf "$ok_message"
+done