SNAP-10A was an experimental nuclear reactor launched into space in 1965
en.wikipedia.org
en.wikipedia.org
[1]: https://en.wikipedia.org/wiki/Kosmos_954
[2]: https://upload.wikimedia.org/wikipedia/commons/7/7c/Cosmos-9...
https://en.wikipedia.org/wiki/Project_Excalibur
Fun fact though, detonating nuclear weapons in outer space causes very wide-spread EMPs. It's a very good thing that the Starfish Prime test was done out in the Pacific instead of at the Nevada test site.