Can these things be tested in space? Instead of doing a test on earth, push something way out to space and test it, what would the impact be on earth if it was far away?
Probably yes, and probably safely once in space, but the difficulty is that it has to travel from the ground through the atmosphere to get to space, and sometimes rockets fail on the way up, creating a bigger problem when they fall back down.
The effect would be a massive EMP damaging infrastructure over hundreds or thousands of miles.
This is also the solution for nuclear waste: Just send it on a direct course to the sun and the problem will solve itself. But getting it reliably on that route is the (still) problematic thing.