Add more JS unit tests

Follow up of #140