mirror of
https://github.com/morluto/rea.git
synced 2026-10-12 02:19:24 +00:00
test: share the client registration command to restore the jscpd gate (#1317)
After #1301 merged, main's duplicated-line share rose to 2.503%, over jscpd's 2.5% threshold, so Static checks fail on every PR. The new OMP test repeated the dialect test's imports and npx registration command. Export that command from the shared client test fixture instead. Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ccfbe87e98
commit
5d16be2a71
@@ -11,14 +11,12 @@ import { supportedClients } from "../../../src/application/SupportedClients.js";
|
||||
import { PRODUCT_IDENTITY } from "../../../src/identity.js";
|
||||
import { isOwnedClientRegistrationCommand } from "../../../src/application/ClientRegistrationIdentity.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { clearClientLocationEnvironment } from "../../fixtures/clientEnvironment.js";
|
||||
import {
|
||||
clearClientLocationEnvironment,
|
||||
NPX_REGISTRATION_COMMAND,
|
||||
} from "../../fixtures/clientEnvironment.js";
|
||||
|
||||
const command = [
|
||||
"npx",
|
||||
"-y",
|
||||
PRODUCT_IDENTITY.registrationPackageSpecifier,
|
||||
"mcp",
|
||||
] as const;
|
||||
const command = NPX_REGISTRATION_COMMAND;
|
||||
|
||||
beforeEach(clearClientLocationEnvironment);
|
||||
|
||||
|
||||
@@ -8,16 +8,13 @@ import { readClientRegistrationStatuses } from "../../../src/application/ClientR
|
||||
import { configureClientConfiguration } from "../../../src/application/SetupClientConfiguration.js";
|
||||
import { supportedClients } from "../../../src/application/SupportedClients.js";
|
||||
import { systemUninstallHost } from "../../../src/application/Uninstall.js";
|
||||
import { PRODUCT_IDENTITY } from "../../../src/identity.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { clearClientLocationEnvironment } from "../../fixtures/clientEnvironment.js";
|
||||
import {
|
||||
clearClientLocationEnvironment,
|
||||
NPX_REGISTRATION_COMMAND,
|
||||
} from "../../fixtures/clientEnvironment.js";
|
||||
|
||||
const command = [
|
||||
"npx",
|
||||
"-y",
|
||||
PRODUCT_IDENTITY.registrationPackageSpecifier,
|
||||
"mcp",
|
||||
] as const;
|
||||
const command = NPX_REGISTRATION_COMMAND;
|
||||
|
||||
beforeEach(clearClientLocationEnvironment);
|
||||
afterEach(() => vi.unstubAllEnvs());
|
||||
|
||||
Vendored
+10
@@ -1,5 +1,15 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
import { PRODUCT_IDENTITY } from "../../src/identity.js";
|
||||
|
||||
/** The default npx registration command setup writes on POSIX hosts. */
|
||||
export const NPX_REGISTRATION_COMMAND = [
|
||||
"npx",
|
||||
"-y",
|
||||
PRODUCT_IDENTITY.registrationPackageSpecifier,
|
||||
"mcp",
|
||||
] as const;
|
||||
|
||||
/** Environment variables that redirect where supported clients keep config. */
|
||||
export const CLIENT_LOCATION_ENVIRONMENT = [
|
||||
"APPDATA",
|
||||
|
||||
Reference in New Issue
Block a user