DEVP-3030, DEVP-2999: refactor js tests