Sha256: 270a1262309d002a79d2a863a46f4b4b1107e03447de8622a85f77dcb88b442e

Contents?: true

Size: 921 Bytes

Versions: 25

Compression:

Stored size: 921 Bytes

Contents

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')
    })
  )

Version data entries

25 entries across 16 versions & 6 rubygems

Version Path
pcp-server-ruby-sdk-0.0.6 node_modules/JSONStream/test/bool.js
pcp-server-ruby-sdk-0.1.0 node_modules/JSONStream/test/bool.js
minimum_viable_product-0.0.11 test/dummy/node_modules/browserify-incremental/node_modules/JSONStream/test/bool.js
minimum_viable_product-0.0.11 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.6 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.5 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.4 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.3 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.2 test/dummy/node_modules/JSONStream/test/bool.js
brwy_rails-0.0.1 test/dummy/node_modules/JSONStream/test/bool.js
snowball-0.1.22 node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/browser-pack/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.3.0 node_modules/browserify/node_modules/deps-sort/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/JSONStream/test/bool.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/JSONStream/test/bool.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js