Add spec for #634

This commit is contained in:
Cheng Zhao 2014-11-06 21:26:54 +08:00
parent 185d3a7c02
commit b360122b35

View file

@ -108,3 +108,11 @@ describe 'node feature', ->
client.on 'error', (error) ->
assert.equal error.code, 'ECONNREFUSED'
done()
describe 'Buffer', ->
it 'can be created from WebKit external string', ->
p = document.createElement 'p'
p.innerText = '闲云潭影日悠悠,物换星移几度秋'
b = new Buffer(p.innerText)
assert.equal b.toString(), '闲云潭影日悠悠,物换星移几度秋'
assert.equal Buffer.byteLength(p.innerText), 45