[Pkg-javascript-commits] [node-detective] 27/119: use tap instead of expresso
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:44:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-detective.
commit ac4b8ff4ae6f1f408ceddaf0ae9730a6670a3e5c
Author: James Halliday <mail at substack.net>
Date: Mon Mar 5 14:24:08 2012 -0800
use tap instead of expresso
---
package.json | 4 ++--
test/both.js | 11 ++++++-----
test/nested.js | 9 +++++----
test/strings.js | 9 +++++----
test/word.js | 9 +++++----
5 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/package.json b/package.json
index f31e1ec..3c794ff 100644
--- a/package.json
+++ b/package.json
@@ -19,13 +19,13 @@
"test" : "test"
},
"scripts" : {
- "test" : "expresso"
+ "test" : "tap test/*.js"
},
"dependencies" : {
"uglify-js" : "~1.2.5"
},
"devDependencies" : {
- "expresso" : "0.7.x"
+ "tap" : "~0.2.3"
},
"engines" : {
"node" : ">=0.4.0"
diff --git a/test/both.js b/test/both.js
index 53e704e..971aebb 100644
--- a/test/both.js
+++ b/test/both.js
@@ -1,10 +1,11 @@
-var assert = require('assert');
+var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/both.js');
-exports.both = function () {
+test('both', function (t) {
var modules = detective.find(src);
- assert.deepEqual(modules.strings, [ 'a', 'b' ]);
- assert.deepEqual(modules.expressions, [ '"c"+x', '"d"+y' ]);
-};
+ t.deepEqual(modules.strings, [ 'a', 'b' ]);
+ t.deepEqual(modules.expressions, [ '"c"+x', '"d"+y' ]);
+ t.end();
+});
diff --git a/test/nested.js b/test/nested.js
index e785b6c..d688c0f 100644
--- a/test/nested.js
+++ b/test/nested.js
@@ -1,8 +1,9 @@
-var assert = require('assert');
+var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/nested.js');
-exports.nested = function () {
- assert.deepEqual(detective(src), [ 'a', 'b', 'c' ]);
-};
+test('nested', function (t) {
+ t.deepEqual(detective(src), [ 'a', 'b', 'c' ]);
+ t.end();
+});
diff --git a/test/strings.js b/test/strings.js
index f7a9b9e..3b5e7d8 100644
--- a/test/strings.js
+++ b/test/strings.js
@@ -1,8 +1,9 @@
-var assert = require('assert');
+var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/strings.js');
-exports.single = function () {
- assert.deepEqual(detective(src), [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]);
-};
+test('single', function (t) {
+ t.deepEqual(detective(src), [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]);
+ t.end();
+});
diff --git a/test/word.js b/test/word.js
index 0c1cc10..cf5397d 100644
--- a/test/word.js
+++ b/test/word.js
@@ -1,11 +1,12 @@
-var assert = require('assert');
+var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/word.js');
-exports.word = function () {
- assert.deepEqual(
+test('word', function (t) {
+ t.deepEqual(
detective(src, { word : 'load' }),
[ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]
);
-};
+ t.end();
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-detective.git
More information about the Pkg-javascript-commits
mailing list