Most all of the coding exercises on CodeHS have our Instant Feedback system built in. Instant Feedback runs student programs through a series of tests to ensure that their code is functionally and stylistically sound, and accomplishes the goals of a given exercise.
Students and teachers can see these Instant Feedback checks when they visit the "Grading" tab in the top right corner of any exercise page, or when they click "Submit + Continue" upon completing an exercise.
One important note about Instant Feedback is that it is not designed to catch all errors/issues all of the time. We think about Instant Feedback like Spell Check. Spell Check ensures that the basic spelling and sentence mechanics are correct, but simply because something passes Spell Check doesn't mean that the entire essay is logically sound. In the same way, Instant Feedback is meant to be a first line of checks to point students in the right direction, but often teachers will want to grade student programs themselves to ensure they are functionally and stylistically correct.