add JS unit tests