A man who took a pregnancy test as a joke has been diagnosed with cancer in time to treat it, all thanks to a comic posted on Reddit.

Reddit — the self-branded "front page of the Internet" — is a social news site with 43 million members and three billion monthly page views. Its users are called Redditors.

Last week, Redditor CappnPoopdeck shared a comic she'd compiled about a male friend of hers who found a pregnancy test in his medicine cabinet, took it for laughs, and got a positive result.

Redditors, thinking the comic was autobiographical, told CappnPoopdeck to get tested for cancer.

"If this is true, you should check yourself for testicular cancer. Seriously. Google it," wrote one user

"Testicular cancer releases some of the same hormone markers that pregnancy tests check for, so although I'm not sure that it's 100% accurate it definitely means he needs to get checked out pronto," wrote another.

Pregnancy tests, in fact, detect beta human chorionic gonadotropin (hCG), a hormone found in pregnant women. But it can also signal testicular cancer.

"It turns out a fair number of testicular cancers make the same exact hormone," Dr. Mark Pomerantz, a genitourinary oncologist at the Dana-Farber Cancer Institute in Boston, told ABC News."There are very few things in the body that produce beta hCG, and testicular cancer is one of them."

When CappnPoopdeck — whom the CBC has identified as a young woman in Hamilton, Ont. — came back to the thread the next day and saw all the replies, she let her friend know he might be in danger.

"Whoa.. just saw all the cancer comments... It was my friend that did the test, I just made the comic for him.. but I am letting him know to test himself for cancer immediately. Thank you for letting me know guys, we may have dodged a bullet here!" she wrote.

She later said her friend would be getting tested.

On Tuesday, she posted another comic, this time in the form of a letter to Reddit.

"Hello, Reddit. Many of you read the comic about my friend using a preg test as a joke and it testing positive, which is a sign of cancer, as all of you told us. Today he went to the doctor to be tested. And in his right testicle they found a very small tumour, but since it was caught early, it can be treated immediately," it reads.

"So both of us want to say thank you, and in all seriousness, if you are male check yourself for testicular cancer regularly. If you're a girl, test yourself for breast cancer regularly.

"Thank you again, Reddit."