[Pkg-javascript-commits] [node-detective] 22/119: passing custom word test
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:44:31 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 8681ee1cef0447028b6964507e4fd1f7ccdb1fac
Author: James Halliday <mail at substack.net>
Date: Fri Nov 25 18:52:51 2011 -0800
passing custom word test
---
test/files/word.js | 13 +++++++++++++
test/word.js | 11 +++++++++++
2 files changed, 24 insertions(+)
diff --git a/test/files/word.js b/test/files/word.js
new file mode 100644
index 0000000..fd074fe
--- /dev/null
+++ b/test/files/word.js
@@ -0,0 +1,13 @@
+var a = load('a');
+var b = load('b');
+var c = load('c');
+var abc = a.b(c);
+
+var EventEmitter = load('events').EventEmitter;
+
+var x = load('doom')(5,6,7);
+x(8,9);
+c.load('notthis');
+var y = load('y') * 100;
+
+var EventEmitter2 = load('events2').EventEmitter();
diff --git a/test/word.js b/test/word.js
new file mode 100644
index 0000000..0c1cc10
--- /dev/null
+++ b/test/word.js
@@ -0,0 +1,11 @@
+var assert = require('assert');
+var detective = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/word.js');
+
+exports.word = function () {
+ assert.deepEqual(
+ detective(src, { word : 'load' }),
+ [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]
+ );
+};
--
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