Use `assert.throws()` instead.