summaryrefslogtreecommitdiffstats
path: root/vid-app-common/gulpfile.js
diff options
context:
space:
mode:
authorgolabek <tomasz.golabek@nokia.com>2019-01-28 09:34:48 +0100
committergolabek <tomasz.golabek@nokia.com>2019-02-01 11:05:48 +0100
commitec4f95457ec430838feeae6da48d0fd011ddffa9 (patch)
treed7c7b40d648a66c86f47ec26fc15acc4660dee8b /vid-app-common/gulpfile.js
parent974fc96fdc47cafb6f7169d197e69cb81e6df4a9 (diff)
Introduce JS unit tests into VID
maven -> npm -> gulp -> jest frameworks added in a mentioned order. Change-Id: I1865228973eb31188fb052e8c9629f0ac01e48a7 Issue-ID: VID-391 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'vid-app-common/gulpfile.js')
-rw-r--r--vid-app-common/gulpfile.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/vid-app-common/gulpfile.js b/vid-app-common/gulpfile.js
new file mode 100644
index 000000000..898f84fe4
--- /dev/null
+++ b/vid-app-common/gulpfile.js
@@ -0,0 +1,18 @@
+var gulp = require("gulp");
+var jest = require("jest");
+
+// -------------- Run Jest Tests --------------
+
+gulp.task("test", function() {
+ return jest.runCLI({}, ".")
+ .then((result) => {
+ if (!result.results.success){
+ console.error("Execution of js tests failed with status 1");
+ process.exit(1);
+ }
+ });
+});
+
+// -------------- Default Task --------------
+
+gulp.task("default", gulp.parallel(["test"])); \ No newline at end of file