[Pkg-javascript-commits] [node-when] 07/08: Add a smoketest to ensure basic operation

Julien Puydt julien.puydt at laposte.net
Sun Aug 27 09:17:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-when.

commit c703e99aabf7a813915ff32354e23169c6172176
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sun Aug 27 00:09:10 2017 +0200

    Add a smoketest to ensure basic operation
---
 debian/tests/control   | 2 +-
 debian/tests/smoketest | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/tests/control b/debian/tests/control
index 87b7125..bd70514 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,2 @@
-Tests: require
+Tests: require smoketest
 Depends: node-when
diff --git a/debian/tests/smoketest b/debian/tests/smoketest
new file mode 100644
index 0000000..0e1f7d3
--- /dev/null
+++ b/debian/tests/smoketest
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+node -e "when=require('when');when(2, function(x){return x+3}).then(function(result){result == 5 || process.exit(1)})"
+node -e "when=require('when');when(0, function(x){throw new Error()}).then(function(x) {process.exit(1)}).catch(function (x) {process.exit(0)})"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-when.git



More information about the Pkg-javascript-commits mailing list