Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership. Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers. BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { afterEach, expect, it, vi } from "vitest";
|
|
|
|
import { electronActiveObservationInputSchema } from "../domain/javascript/electronActiveObservation.js";
|
|
import { PlaywrightElectronActiveProvider } from "./PlaywrightElectronActiveProvider.js";
|
|
|
|
afterEach(() => vi.unstubAllEnvs());
|
|
|
|
it("passes the selected environment and ownership token to Electron launch", async () => {
|
|
vi.stubEnv("LANG", "ambient-language");
|
|
let launchedEnvironment: unknown;
|
|
const provider = new PlaywrightElectronActiveProvider(
|
|
{
|
|
LANG: "selected-language",
|
|
PATH: "/selected/bin",
|
|
REA_PRIVATE_VALUE: "not-a-launch-setting",
|
|
},
|
|
async (options) => {
|
|
launchedEnvironment = options?.env;
|
|
throw new Error("launch boundary reached");
|
|
},
|
|
);
|
|
const result = await provider.capture(
|
|
electronActiveObservationInputSchema.parse({
|
|
executable_path: process.execPath,
|
|
application_path: process.execPath,
|
|
}),
|
|
);
|
|
|
|
expect(result.ok).toBe(false);
|
|
expect(launchedEnvironment).toEqual({
|
|
LANG: "selected-language",
|
|
PATH: "/selected/bin",
|
|
REA_PROCESS_RUN_ID: expect.any(String),
|
|
});
|
|
});
|