Using `assert.throws()` instead of `try/catch`.