fixed for JS target; removed constraints test (still wip)