[Pkg-javascript-commits] [node-module-deps] 254/444: all tests updated

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:01 UTC 2017


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

rouca pushed a commit to branch master
in repository node-module-deps.

commit 93b793a306aa77ae518103635c68389c067af12b
Author: James Halliday <mail at substack.net>
Date:   Sun Jul 20 03:33:14 2014 -0700

    all tests updated
---
 test/bundle.js           |  3 ++-
 test/filter.js           | 13 ++++++-------
 test/noparse.js          |  3 ++-
 test/pkg_filter.js       |  4 +++-
 test/tr_2dep_module.js   |  3 ++-
 test/tr_fn.js            |  3 ++-
 test/tr_global.js        |  3 ++-
 test/tr_module.js        |  3 ++-
 test/tr_opts.js          |  3 ++-
 test/tr_rel.js           |  3 ++-
 test/tr_sh.js            |  3 ++-
 test/tr_whole_package.js |  3 ++-
 test/unicode.js          |  3 ++-
 13 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/test/bundle.js b/test/bundle.js
index fab5958..9ce44f9 100644
--- a/test/bundle.js
+++ b/test/bundle.js
@@ -5,7 +5,8 @@ var packer = require('browser-pack');
 
 test('bundle', function (t) {
     t.plan(1);
-    var p = parser(__dirname + '/files/main.js');
+    var p = parser();
+    p.end(__dirname + '/files/main.js');
     p.on('error', t.fail.bind(t));
     var pack = packer();
     
diff --git a/test/filter.js b/test/filter.js
index b9117c2..de6704b 100644
--- a/test/filter.js
+++ b/test/filter.js
@@ -9,13 +9,12 @@ var collect = []
 var entry = path.join(__dirname, 'files', 'filterable.js')
 
 test('can filter core deps', function (t) {
-
-    mdeps(entry, {
+    var p = mdeps({
         filter: function (e) {
             return !~core.indexOf(e)
         }
     })
-    .on('data', function (d) {
+    p.on('data', function (d) {
         collect.push(d)
         t.equal(d.id, entry)
         t.deepEqual(d.deps, {
@@ -28,10 +27,10 @@ test('can filter core deps', function (t) {
             dns: false
         })
         t.equal(d.entry, true)
-    })
-    .on('end', function () {
+    });
+    p.on('end', function () {
         t.equal(collect.length, 1)
         t.end()
-    })
-
+    });
+    p.end(entry);
 })
diff --git a/test/noparse.js b/test/noparse.js
index eede91b..b3fbf19 100644
--- a/test/noparse.js
+++ b/test/noparse.js
@@ -15,7 +15,8 @@ var sources = Object.keys(files).reduce(function (acc, file) {
 
 test('noParse', function (t) {
     t.plan(1);
-    var p = parser(files.main, { noParse: [ files.foo ] });
+    var p = parser({ noParse: [ files.foo ] });
+    p.end(files.main);
     var rows = [];
     
     p.on('data', function (row) { rows.push(row) });
diff --git a/test/pkg_filter.js b/test/pkg_filter.js
index 7aa2423..e86eaed 100644
--- a/test/pkg_filter.js
+++ b/test/pkg_filter.js
@@ -7,13 +7,15 @@ var concat = require('concat-stream');
 test('pkg filter', function (t) {
     t.plan(3);
     
-    var p = mdeps(__dirname + '/files/pkg_filter/test.js', {
+    var p = mdeps({
         packageFilter: function (pkg) {
             t.equal(pkg.main, 'one.js');
             pkg.main = 'two.js'
             return pkg;
         }
     });
+    p.end(__dirname + '/files/pkg_filter/test.js');
+    
     var pack = packer();
     p.pipe(JSONStream.stringify()).pipe(pack);
     
diff --git a/test/tr_2dep_module.js b/test/tr_2dep_module.js
index ce4b193..8204f30 100644
--- a/test/tr_2dep_module.js
+++ b/test/tr_2dep_module.js
@@ -5,10 +5,11 @@ var packer = require('browser-pack');
 
 test('transform', function (t) {
     t.plan(3);
-    var p = mdeps(__dirname + '/files/tr_2dep_module/main.js', {
+    var p = mdeps({
         transform: [ 'insert-aaa', 'insert-bbb' ],
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_2dep_module/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/tr_fn.js b/test/tr_fn.js
index c3c0a27..2c54e0a 100644
--- a/test/tr_fn.js
+++ b/test/tr_fn.js
@@ -6,7 +6,7 @@ var through = require('through');
 
 test('transform', function (t) {
     t.plan(3);
-    var p = mdeps(__dirname + '/files/tr_sh/main.js', {
+    var p = mdeps({
         transform: function (file) {
             return through(function (buf) {
                 this.queue(String(buf)
@@ -17,6 +17,7 @@ test('transform', function (t) {
         },
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_sh/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/tr_global.js b/test/tr_global.js
index b748797..f68f096 100644
--- a/test/tr_global.js
+++ b/test/tr_global.js
@@ -7,7 +7,7 @@ var concat = require('concat-stream');
 test('global transforms', function (t) {
     t.plan(1);
     
-    var p = mdeps(__dirname + '/files/tr_global/main.js', {
+    var p = mdeps({
         transform: [ 'tr-c', 'tr-d' ],
         globalTransform: [
             __dirname + '/files/tr_global/node_modules/tr-e',
@@ -15,6 +15,7 @@ test('global transforms', function (t) {
         ],
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_global/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) {
diff --git a/test/tr_module.js b/test/tr_module.js
index 0758b7d..525cd52 100644
--- a/test/tr_module.js
+++ b/test/tr_module.js
@@ -5,10 +5,11 @@ var packer = require('browser-pack');
 
 test('transform', function (t) {
     t.plan(4);
-    var p = mdeps(__dirname + '/files/tr_module/main.js', {
+    var p = mdeps({
         transform: [ 'insert-aaa', 'insert-bbb' ],
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_module/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/tr_opts.js b/test/tr_opts.js
index 2b4728d..698c858 100644
--- a/test/tr_opts.js
+++ b/test/tr_opts.js
@@ -6,9 +6,10 @@ var concat = require('concat-stream');
 
 test('transform options', function (t) {
     t.plan(1);
-    var p = mdeps(__dirname + '/tr_opts/main.js', {
+    var p = mdeps({
         transformKey: [ 'mdtr' ]
     });
+    p.end(__dirname + '/tr_opts/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) {
diff --git a/test/tr_rel.js b/test/tr_rel.js
index a5cc303..dbe1fd6 100644
--- a/test/tr_rel.js
+++ b/test/tr_rel.js
@@ -5,9 +5,10 @@ var packer = require('browser-pack');
 
 test('transform', function (t) {
     t.plan(1);
-    var p = mdeps(__dirname + '/files/tr_rel/subdir/main.js', {
+    var p = mdeps({
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_rel/subdir/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/tr_sh.js b/test/tr_sh.js
index c9f7bc0..42ad55f 100644
--- a/test/tr_sh.js
+++ b/test/tr_sh.js
@@ -5,10 +5,11 @@ var packer = require('browser-pack');
 
 test('transform', function (t) {
     t.plan(3);
-    var p = mdeps(__dirname + '/files/tr_sh/main.js', {
+    var p = mdeps({
         transform: [ './tr_a.js', './tr_b.js' ],
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_sh/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/tr_whole_package.js b/test/tr_whole_package.js
index b0d7eea..f3db796 100644
--- a/test/tr_whole_package.js
+++ b/test/tr_whole_package.js
@@ -5,9 +5,10 @@ var packer = require('browser-pack');
 
 test('transform', function (t) {
     t.plan(1);
-    var p = mdeps(__dirname + '/files/tr_whole_package/main.js', {
+    var p = mdeps({
         transformKey: [ 'browserify', 'transform' ]
     });
+    p.end(__dirname + '/files/tr_whole_package/main.js');
     var pack = packer();
     
     p.pipe(JSONStream.stringify()).pipe(pack);
diff --git a/test/unicode.js b/test/unicode.js
index 6bbc718..1b8aab1 100644
--- a/test/unicode.js
+++ b/test/unicode.js
@@ -15,7 +15,8 @@ var sources = Object.keys(files).reduce(function (acc, file) {
 
 test('unicode deps', function (t) {
     t.plan(1);
-    var p = parser(files.main);
+    var p = parser();
+    p.end(files.main);
     var rows = [];
     
     p.on('data', function (row) { rows.push(row) });

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



More information about the Pkg-javascript-commits mailing list