Skip to content

Restore !isCloud coverage in authTokenPriority.test.ts after the team-workspace flag retirement #14739

Description

@christian-byrne

Residual from the review of #14613. Non-blocking, small.

#14613 replaced flags.teamWorkspacesEnabled with isCloud in authStore.getAuthHeader() and getAuthToken(). The negative test case that covered the other branch was deleted in the same push and never restored:

it('skips workspace header when team_workspaces feature is disabled', async () => { ... })

src/stores/__tests__/authTokenPriority.test.ts now has no coverage for !isCloud skipping the workspace header, so a regression that made the workspace-token branch unconditional would not be caught anywhere in the suite.

The adaptation is close to one line: the file already hoists a mutable mockDistributionTypes at :17-22 wired through vi.mock('@/platform/distribution/types', ...) at :101, so the case can be restored against the surviving isCloud guard instead of the retired flag.

Thread: #14613 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions