לְמַ֛עַן נַסּ֥וֹת בָּ֖ם אֶת־יִשְׂרָאֵ֑ל הֲשֹׁמְרִ֣ים הֵם֩ אֶת־דֶּ֨רֶךְ יְהוָ֜ה לָלֶ֣כֶת בָּ֗ם כַּאֲשֶׁ֛ר שָׁמְר֥וּ אֲבוֹתָ֖ם אִם־לֹֽא׃
כּדי צו פּרוּװן מיט זײ ישׂראל, אױב זײ װעלן היטן די װעגן פֿון גאָט צו גײן אין זײ, אַזױ װי זײערע עלטערן האָבן געהיט, אָדער ניט.
Rashi
Whether they observe. The letter ה is vocalized with the abridged pasach,15This vocalization is used to express inquiry. as it expresses the inquiry involved in testing.
Metzudat David
IN ORDER TO TEST: It wants to teach that because of this, Hashem chose this punishment, and not others in order to test Israel if they will serve their GD or if not. And this is why its written "if they will guard."