Files
upstash__context7/packages/cli/vitest.config.ts
Fahreddin Özcan 18b3292d01 fix(cli): add token refresh and centralize auth constants (#2210)
* fix(cli): add token refresh support and centralize auth constants

Expired OAuth tokens are now automatically refreshed via getValidAccessToken()
instead of silently failing. CLI_CLIENT_ID moved to constants.ts to avoid
duplication across auth.ts and setup.ts.

* refactor(cli): internalize baseUrl and clientId in refreshAccessToken

Make refreshAccessToken a private function that resolves getBaseUrl()
and CLI_CLIENT_ID internally instead of requiring them as parameters.

* test(cli): add unit tests for auth utilities and commands

Add comprehensive vitest test suite covering OAuth PKCE flow, token
persistence, token refresh, and CLI auth commands (login/logout/whoami).

* chore: add changeset for CLI auth improvements

* refactor: move CLI auth tests to src/__tests__/

Move auth test files from colocated __tests__ directories to a
centralized src/__tests__/ directory, adjusting mock import paths
accordingly.
2026-03-16 13:03:33 +03:00

10 lines
175 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
environment: "node",
include: ["src/**/*.test.ts"],
},
});