Added code samples for README.md to tests.js