diff --git a/src/dynamic-import/syntax/invalid/nested-with-expression.template b/src/dynamic-import/syntax/invalid/nested-with-expression.template
index 3178c74e5519e1ef2923a40a2e1cb027ad8633af..591ea20b6a4878a134c3a6273d1991e29ff8cdba 100644
--- a/src/dynamic-import/syntax/invalid/nested-with-expression.template
+++ b/src/dynamic-import/syntax/invalid/nested-with-expression.template
@@ -25,6 +25,6 @@ negative:
   type: SyntaxError
 ---*/
 
-throw "Test262: This statement should not be evaluated.";
+$DONOTEVALUATE();
 
 with (/*{ import }*/) {}