Changed tests to proper javascript tests