If someone launched a nuke in space how would other nuclear powers react? I doubt they would assume "this is probably just an EMP and not a direct nuclear strike on our territory"
We'd bitch and moan and then carry on as usual. Nobody is starting thermonuclear war over fried birds. Maybe someone gets tariffed.
https://en.wikipedia.org/wiki/Outer_Space_Treaty
I don't know how someone like me would even tell if this treaty is taken seriously. For example, going to space is really hard and has historically been somewhat unreliable at the best of times, which may mean that back in 1967 everyone was thinking "we don't even want a 1% chance that someone's failed launch to drop a 99%-usable warhead on a random location where some tiny country or organised crime group can find it".