Skip to content

Commit

Permalink
tests: adding option to prevent students from using eval for elementa…
Browse files Browse the repository at this point in the history
…ry exercise
  • Loading branch information
zanninso committed Dec 18, 2024
1 parent 31a3d31 commit 4c06736
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ if test "$CODE_EDITOR_RUN_ONLY" = true; then
exit
fi

if test $EXERCISE = "elementary"; then
node --disallow-code-generation-from-strings /app/test.mjs "/jail/student" "${EXERCISE}"
exit
fi

node /app/test.mjs "/jail/student" "${EXERCISE}"

0 comments on commit 4c06736

Please sign in to comment.