The Republican-controlled U.S. House of Representatives passed legislation on Friday that would avert a midnight government shutdown, defying U.S. president-elect Donald Trump's demand to also greenlight trillions of dollars in new debt.