The outcome was uncertain after US President-elect Donald Trump had insisted the deal include an increase in the government’s borrowing limit.