Here "hearts" is a metonym for a person's mind. The phrase "harden your hearts" is a metaphor for being stubborn. Alternate translation: "do not be stubborn" or "do not refuse to listen" (See: [[rc://en/ta/man/jit/figs-metonymy]])
Here "rebellion" and "testing" can be stated as verbs. Alternate translation: "as when your ancestors rebelled against God and tested him in the wilderness" (See: [[rc://en/ta/man/jit/figs-abstractnouns]])