Fixed #5561: [2.x]Fix js tests compilation issue