added js functions unit test