Add spec for #634
This commit is contained in:
parent
185d3a7c02
commit
b360122b35
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue