toBeTrue(); }); it('treats a redis connection exception as transient', function () { expect(TransientException::matches(new RedisException('connection refused')))->toBeTrue(); }); it('treats a redis limiter timeout as transient', function () { expect(TransientException::matches(new LimiterTimeoutException))->toBeTrue(); }); it('does not treat a generic runtime exception as transient', function () { expect(TransientException::matches(new RuntimeException('genuine bug')))->toBeFalse(); }); it('does not treat a type error as transient', function () { expect(TransientException::matches(new TypeError('bad argument')))->toBeFalse(); });