There are a number of vacuum test facilities available for testing engines in space and near-space conditions. The NASA White Sands Test Facility has several test stands for space and near-space testing, but they don't have really memorable names:

Test Stand 302 is an insulated 32 ft diameter by 38 ft high (10 m diameter by 11. 6 m high) carbon steel altitude chamber with three interior levels for test article access with a dual-position, vertical or horizontal firing capability, and an altitude capability of up to 100 K ft (30.5 km) for engine firings using the steam ejector system and up to 250 K ft (76 km) non-firing capability with vacuum pumps.
Test Stand 303 is an insulated 11 ft diameter by 39 ft long (3.35 m diameter by 11.9 m long) horizontal carbon steel altitude chamber capable of holding propulsion systems up to approximately 7 ft (2.13 m) in diameter and 25 ft (7.6 m) in length. It is capable of testing single engines or test articles with multiple engines up to 1000 lbf (4.5 kN) total thrust. It has a single-position, horizontal firing capability and an altitude capability of up to 100 K ft (30.4 km) for engines firing using the steam ejector system and up to 250 K ft (76 km) non-firing capability with vacuum pumps.

Test Stand 401 is a 32 ft diameter by 33 ft high (9.75 m diameter by 10 m high) carbon steel altitude chamber capable of accommodating a vehicle with a thrust vector-controlled 25 K lbf (110-kN) thrust engine firing vertically downward. The stand is capable of testing maximum test articles of 15 ft by 15 ft by 45 ft (4.6 m x 4.6 m x 13.7 m). It has three interior levels that can be reconfigured to meet test requirements. It has a dual-position, vertical and horizontal firing capability and an altitude capability up to 100 K (30.5 km) for engine firings using the steam ejector system and up to 250 K (76 km) non-firing capability with vacuum pumps.
There are several more. The altitude of White Sands (about 5k feet) means that even the ambient stands are working at a somewhat-reduced pressure.
NASA AFRL has multiple smaller cells, one of which can go to higher altitudes:
The Space Environment Simulation Facility (1-42C) can perform static tests simulating space altitudes of up to 650K ft. The chamber is a 30 ft. diameter sphere capable of achieving 1 X 10-6 Torr at temperatures of -300F or +400F.
Blue Origin is apparently upgrading and using that facility now.
Apparently, the Glenn Center even had a facility for vacuum testing of nuclear rockets....