Move buffer copy tests to javascript
Add Buffer functions testing to Javascript.