fix(gsd): remove redundant assertions that fail TS2367 typecheck

After assert.equal narrows result.kind to a literal type, comparing
it against a different literal is flagged as always-true by tsc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Iouri Goussev 2026-03-26 13:39:52 -04:00
parent b56eb882bb
commit 878ed00f1b

View file

@ -13,7 +13,6 @@ test("#2309: 'terminated' errors should be classified as transient", () => {
const result = classifyError("terminated");
assert.equal(isTransient(result), true, "'terminated' should be transient");
assert.equal(result.kind, "connection", "'terminated' matches connection");
assert.equal(result.kind !== "rate-limit", true, "'terminated' is not a rate limit");
assert.ok("retryAfterMs" in result && result.retryAfterMs > 0, "'terminated' should have a retry delay");
assert.equal("retryAfterMs" in result && result.retryAfterMs, 15_000, "'terminated' should use 15s backoff");
});
@ -63,7 +62,6 @@ test("#2572: 'Expected double-quoted property name' (truncated stream) is transi
const result = classifyError("Expected double-quoted property name in JSON at position 23 (line 1 column 24)");
assert.equal(isTransient(result), true, "truncated-stream JSON parse error should be transient");
assert.equal(result.kind, "stream", "JSON parse errors are stream kind");
assert.equal(result.kind !== "rate-limit", true, "not a rate limit");
assert.equal("retryAfterMs" in result && result.retryAfterMs, 15_000, "should use 15s backoff");
});