I threw up randomly

My period is lighter than usual and I threw up last night randomly. I didn't feel it coming I just threw up. Should I take a test?