[Pkg-javascript-commits] [node-isexe] 04/05: Runtestsuite
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 15:31:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-isexe.
commit 5c51705704d4c9490a8fa7ef6d5003680a213f46
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Fri Aug 25 17:25:55 2017 +0200
Runtestsuite
---
debian/tests/control | 6 +++---
debian/tests/runtestsuite | 15 +++++++++++++++
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index 06e8213..ad3056f 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,5 +1,5 @@
Tests: require
-Depends: node-isexe
+Depends: node-isexe, nodejs (>= 6)
-Test-Command: tap test/*.js --branches=100 --statements=100 --functions=100 --lines=100
-Depends: @, node-tap, node-rimraf
+Tests: runtestsuite
+Depends: node-isexe, node-tap, node-rimraf
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..3953b24
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='isexe'
+SEDCMD="s,(require|resolve)\s*[(]\s*'[.][.]/,\\1('$PACKAGE,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/test
+find test/ -maxdepth 1 -name '*.js' -print0 | \
+ xargs -0 -n1 \
+ sh -c 'set -e; echo "TESTING: $3"; sed -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+cd $tmpdir
+tap -R spec test/*.js --branches=100 --statements=100 --functions=100 --lines=100;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-isexe.git
More information about the Pkg-javascript-commits
mailing list