Added tests for view.js.