[Pkg-javascript-commits] [node-detective] 55/119: check that can handle [, , , , ]

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:44:34 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 bcdbda2656da2440d857cdc0fcadef22ae5a4a12
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Tue May 21 23:44:48 2013 +0200

    check that can handle [,,,,]
---
 test/files/sparse-array.js |  3 +++
 test/sparse-array.js       | 14 ++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/test/files/sparse-array.js b/test/files/sparse-array.js
new file mode 100644
index 0000000..fa0d23c
--- /dev/null
+++ b/test/files/sparse-array.js
@@ -0,0 +1,3 @@
+var o = [,,,,]
+
+require('./foo')
diff --git a/test/sparse-array.js b/test/sparse-array.js
new file mode 100644
index 0000000..f64f359
--- /dev/null
+++ b/test/sparse-array.js
@@ -0,0 +1,14 @@
+var test = require('tap').test;
+var detective = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/sparse-array.js');
+
+test('sparse-array', function (t) {
+    //just check that this does not crash.
+    t.doesNotThrow(function () {
+      detective(src)
+    })
+    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