[Pkg-javascript-commits] [node-jsonstream] 34/214: failing test for bools is just two-ways.js with /./ changed to true
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-jsonstream.
commit 791e07a5e04452e2afe1a08a6c71d16cb4db3223
Author: James Halliday <mail at substack.net>
Date: Thu Jun 14 03:46:02 2012 -0700
failing test for bools is just two-ways.js with /./ changed to true
---
test/bool.js | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/test/bool.js b/test/bool.js
new file mode 100644
index 0000000..6c386d6
--- /dev/null
+++ b/test/bool.js
@@ -0,0 +1,41 @@
+
+var fs = require ('fs')
+ , join = require('path').join
+ , file = join(__dirname, 'fixtures','all_npm.json')
+ , JSONStream = require('../')
+ , it = require('it-is').style('colour')
+
+ function randomObj () {
+ return (
+ Math.random () < 0.4
+ ? {hello: 'eonuhckmqjk',
+ whatever: 236515,
+ lies: true,
+ nothing: [null],
+// stuff: [Math.random(),Math.random(),Math.random()]
+ }
+ : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]]
+ )
+ }
+
+var expected = []
+ , stringify = JSONStream.stringify()
+ , es = require('event-stream')
+ , stringified = ''
+ , called = 0
+ , count = 10
+ , ended = false
+
+while (count --)
+ expected.push(randomObj())
+
+ es.connect(
+ es.readArray(expected),
+ stringify,
+ JSONStream.parse([true]),
+ es.writeArray(function (err, lines) {
+
+ it(lines).has(expected)
+ console.error('PASSED')
+ })
+ )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git
More information about the Pkg-javascript-commits
mailing list