summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/JSONStream/test/stringify.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/JSONStream/test/stringify.js')
-rw-r--r--deps/node/deps/npm/node_modules/JSONStream/test/stringify.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/deps/node/deps/npm/node_modules/JSONStream/test/stringify.js b/deps/node/deps/npm/node_modules/JSONStream/test/stringify.js
deleted file mode 100644
index 20b99695..00000000
--- a/deps/node/deps/npm/node_modules/JSONStream/test/stringify.js
+++ /dev/null
@@ -1,41 +0,0 @@
-
-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([/./]),
- es.writeArray(function (err, lines) {
-
- it(JSON.parse(lines.join(''))).deepEqual(expected)
- console.error('PASSED')
- })
- )