fix(tests): revert to main's DO token test (posthog filter was redundant after #3425)

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
B 2026-05-21 13:04:00 +00:00
parent 6927c1eb2b
commit 720dde6481

View file

@ -88,16 +88,12 @@ describe("doApi 401 OAuth recovery", () => {
it("attempts OAuth recovery on 401 before throwing", async () => {
state.token = "expired-token";
let doCallCount = 0;
let callCount = 0;
globalThis.fetch = mock((url: string | URL | Request) => {
callCount++;
const urlStr = String(url);
// Ignore telemetry (PostHog) fire-and-forget calls triggered by logWarn
if (urlStr.includes("posthog") || urlStr.includes("i.posthog")) {
return Promise.resolve(new Response("ok"));
}
doCallCount++;
// First call: the actual API call returning 401
if (doCallCount === 1) {
if (callCount === 1) {
return Promise.resolve(
new Response("Unauthorized", {
status: 401,