[Pkg-javascript-commits] [node-astw] 14/30: failing json test
Bastien Roucariès
rouca at moszumanska.debian.org
Tue Sep 26 12:55:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-astw.
commit ce6de376050b8f2e7422cdd3ed0206b9b627a8ae
Author: James Halliday <mail at substack.net>
Date: Thu Mar 20 00:59:45 2014 -0700
failing json test
---
test/json.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/test/json.js b/test/json.js
new file mode 100644
index 0000000..cd9bc8c
--- /dev/null
+++ b/test/json.js
@@ -0,0 +1,13 @@
+var astw = require('../');
+var test = require('tape');
+
+test('json', function (t) {
+ t.plan(2);
+ var numbers = [ 1, 2 ];
+ var walk = astw('{"a":1,"b":2}');
+ walk(function (node) {
+ if (node.type === 'Literal' && typeof node.value === 'number') {
+ t.equal(node.value, numbers.shift());
+ }
+ });
+});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-astw.git
More information about the Pkg-javascript-commits
mailing list