。
She studied hard to pass the test.
Literal
She [topic-は] that test [for-に] pass [so as to-ように] earnestly studied.
~ように with a non-volitional or potential verb ('be able to pass') signals goal or purpose: 'so that [she could] pass'. Distinct from purposive ために (which requires the same subject for both clauses), ように accommodates passing-as-an-outcome since 合格する is essentially a state-change. 懸命に ('earnestly, with all one's might') is in the same family as 一生懸命 — the kanji 懸 carries 'staking, putting at risk', so 懸命 is literally 'staking one's life'. テスト is a katakana loanword; 試験 is the formal Sino-Japanese equivalent.