1 var concat = require('../')
2 var test = require('tape')
4 test('type inference works as expected', function(t) {
6 t.equal(stream.inferEncoding(['hello']), 'array', 'array')
7 t.equal(stream.inferEncoding(new Buffer('hello')), 'buffer', 'buffer')
8 t.equal(stream.inferEncoding(undefined), 'buffer', 'buffer')
9 t.equal(stream.inferEncoding(new Uint8Array(1)), 'uint8array', 'uint8array')
10 t.equal(stream.inferEncoding('hello'), 'string', 'string')
11 t.equal(stream.inferEncoding(''), 'string', 'string')
12 t.equal(stream.inferEncoding({hello: "world"}), 'object', 'object')
13 t.equal(stream.inferEncoding(1), 'buffer', 'buffer')