Skip to content

fix(test): drop the redundant unstubAllEnvs hook from the chat utils tests - #10598

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/chat-utils-test-drop-unstub
Dec 1, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/chat-utils-test-drop-unstub

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator
  • fix(test): stub NODE_ENV in the chat utils tests instead of replacing process #10597 added afterEach(() => vi.unstubAllEnvs()); the shared vitest config already restores stubbed env values before every test, and check:test-patterns flags it as a redundant hook, so staging's lint (check:audits) is red.
  • Removes the hook and its import. Verified locally: check:test-patterns passes and the test passes 8/8 with GITHUB_ACTIONS=true.

…tests

The shared vitest config already restores stubbed env values before every
test, and check:test-patterns forbids vi.unstubAll*() in hooks; #10597's hook
turned staging's lint red.
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Dec 1, 2026 9:23pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] This PR appears safe to merge.

Summary

Removes the redundant environment cleanup hook and unused afterEach import from the chat utility tests.

  • Chat utility tests leave environment resets to shared Vitest setup.

Reviews (1) · Last reviewed commit: "fix(test): drop the redundant unstubAllE..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit c6828db into staging Dec 1, 2026
49 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/chat-utils-test-drop-unstub branch December 1, 2026 21:26

This branch was previously deployed

1 inactive deployment
Preview — a7007257 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant