General Motors announced Wednesday that it would lay off 2,000 workers in Michigan and Ohio in early 2017, a move that could test President-elect Donald Trump's commitment to preventing layoffs in the auto industry.

The automaker said it would "align production output with demand for cars" by cutting shifts at factories in Lansing, Mich., and Lordstown, Ohio, while spending $900 million at three plants for other products.

Trump has already criticized General Motors for reports that it would shift some production to Mexico, a plan that the company hasn't confirmed and didn't allude to Wednesday.

The incoming Republican president also has said that he would impose a 35 percent tariff on the products of former U.S. subsidiaries that moved out of the country.

When Ford announced the opening of a new factory in Mexico earlier this year, Trump called it an "absolute disgrace" and pledged to tax its imports to the U.S.

He has made similar threats to businesses in other industries that move operations overseas, such as air conditioning manufacturer Carrier and Nabisco, the maker of Oreos.