Common exercise operations. Feel free to extend!
Create an exercise instance like so:
var exercise = require('@workshop/exercise')(require('./package.json').name)Will be true if the student has passed this exercise, otherwise false.
To be called with success being either true or false. The following are
mostly equivalent:
exercise.passed = true
exercise.attempt(true)However .attempt will not "unpass" a lesson, and as such it's recommended to
change it this way instead of using exercise.passed unless you explicitly want
to revert the lesson state.
Emitted when exercise.attempt is called.