I was so scared my heart was pounding!

Literal

Scary [and-くて] heart-pounding did [emphasis-よ].

どきどき is one of the most common 擬態語 — it represents a heart pounding from fear, excitement, or nervousness. ~くて links the cause (scared) to the result (pounding heart). よ asserts the experience.