Remove assertThrows and use assert.throw instead