adding some tests to javascript