[JS] Fix unit test