[Pkg-javascript-commits] [node-module-deps] 27/444: transform test files

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:40 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 7f80edc932159dca9c01169ac3bffa46ce45baae
Author: James Halliday <mail at substack.net>
Date:   Tue Feb 26 16:20:00 2013 -0800

    transform test files
---
 test/files/tr/f.js                        | 1 +
 test/files/tr/main.js                     | 7 +++++++
 test/files/tr/node_modules/g/index.js     | 1 +
 test/files/tr/node_modules/g/package.json | 6 ++++++
 test/files/tr/node_modules/m/index.js     | 3 +++
 5 files changed, 18 insertions(+)

diff --git a/test/files/tr/f.js b/test/files/tr/f.js
new file mode 100644
index 0000000..39c9ea4
--- /dev/null
+++ b/test/files/tr/f.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x + BBB }
diff --git a/test/files/tr/main.js b/test/files/tr/main.js
new file mode 100644
index 0000000..084b20e
--- /dev/null
+++ b/test/files/tr/main.js
@@ -0,0 +1,7 @@
+var f = require('./f.js');
+var m = require('m');
+var g = require('g');
+
+t.equal(m(f(AAA)), 555, 'transformation scope');
+t.equal(g(3), 333, 'sub-transformation applied');
+t.equal(typeof GGG, 'undefined', 'GGG leak');
diff --git a/test/files/tr/node_modules/g/index.js b/test/files/tr/node_modules/g/index.js
new file mode 100644
index 0000000..ee3356a
--- /dev/null
+++ b/test/files/tr/node_modules/g/index.js
@@ -0,0 +1 @@
+module.exports = function (x) { return x * GGG }
diff --git a/test/files/tr/node_modules/g/package.json b/test/files/tr/node_modules/g/package.json
new file mode 100644
index 0000000..a3a7dbe
--- /dev/null
+++ b/test/files/tr/node_modules/g/package.json
@@ -0,0 +1,6 @@
+{
+  "main": "index.js",
+  "browserify": {
+    "transform": "sed s/GGG/111/g"
+  }
+}
diff --git a/test/files/tr/node_modules/m/index.js b/test/files/tr/node_modules/m/index.js
new file mode 100644
index 0000000..4cd0ff3
--- /dev/null
+++ b/test/files/tr/node_modules/m/index.js
@@ -0,0 +1,3 @@
+var AAA = 200, BBB = 300;
+
+module.exports = function (x) { return AAA + BBB + x }

-- 
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