From cf8249acf93beefc75acad9abf9bd41d0f84976b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Wed, 7 Jun 2017 17:37:32 +0200 Subject: [PATCH] add unit tests. shhh ! --- package.json | 2 +- tests/run-unit-tests.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/run-unit-tests.sh diff --git a/package.json b/package.json index 08b3ec1..1fa3291 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "An OpenShift Demo app running on NodeJS", "main": "server.js", "scripts": { - "test": "./tests/run-integration-tests.sh" + "test": "./tests/run-unit-tests.sh" }, "author": "Nicolas MASSE", "repository": "https://github.com/nmasse-itix/OpenShift-Demo-NodeJS.git", diff --git a/tests/run-unit-tests.sh b/tests/run-unit-tests.sh new file mode 100644 index 0000000..9ab346c --- /dev/null +++ b/tests/run-unit-tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Exit immediately if command returns non-zero status code +set -e + +# Currently, it is just a syntax check +node -c server.js + + +# TODO: do a better job at unit testing :)