[Pkg-javascript-commits] [node-stack-utils] 46/67: test 2 at() edge cases not already covered

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:53:05 UTC 2017


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

rouca pushed a commit to branch master
in repository node-stack-utils.

commit 254ee65a27786b65ca43bd9ebf1b8a5e238c5bbd
Author: isaacs <i at izs.me>
Date:   Sun Apr 23 13:25:16 2017 -0700

    test 2 at() edge cases not already covered
---
 test/at.js | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/test/at.js b/test/at.js
new file mode 100644
index 0000000..c2223e7
--- /dev/null
+++ b/test/at.js
@@ -0,0 +1,24 @@
+// some capture edge cases not already covered by other tests
+
+var StackUtils = require('../')
+var t = require('tap')
+
+var stack = new StackUtils()
+
+// a capture with no function, not much to it, actually
+var base = __filename.substr(process.cwd().length + 1)
+t.match(stack.at(), { line: Number, column: Number, file: base })
+
+// a capture from a native site
+var arr = [ 0 ]
+var captures = arr.map(function xyz (n) {
+  return stack.at(xyz)
+})
+t.same(captures, [ {
+  line: 1,
+  column: 1,
+  file: 'native array.js',
+  native: true,
+  type: 'Array',
+  function: 'map'
+} ])

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



More information about the Pkg-javascript-commits mailing list