Use `assert.throws()` to determine when an error is thrown.