Js tests

Work in progress.
Most of the js tests are done. I don't think I will be able to test drag_drop.js