reorganised js unit specs