Add js tests for upload.js