Add end-to-end test suite (#2167)

This commit is contained in:
Felix Weinberger 2026-05-29 13:29:47 +01:00 • committed by GitHub
commit c36e1ef5bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

43
test/e2e/types.ts Normal file
View file

@ -0,0 +1,43 @@
/**
* Shared types for the e2e suite.
*/
export const ALL_TRANSPORTS = ['inMemory', 'stdio', 'streamableHttp', 'streamableHttpStateless', 'sse'] as const;
export type Transport = (typeof ALL_TRANSPORTS)[number];
export const ALL_SPEC_VERSIONS = ['2025-11-25'] as const;
export type SpecVersion = (typeof ALL_SPEC_VERSIONS)[number];
/**
* Arguments every test body receives. Expand with new matrix axes here so
* test signatures don't churn — bodies destructure only what they use.
*/
export interface TestArgs {
transport: Transport;
protocolVersion: SpecVersion;
}
export interface KnownFailure {
test?: string;
transport?: Transport;
specVersion?: SpecVersion;
note: string;
}
export interface Requirement {
source: string;
behavior: string;
transports?: readonly Transport[];
/** Free-form rationale for how the entry is set up (e.g. why certain transports are excluded). */
note?: string;
/** First / last spec versions a requirement applies to; changed behaviors are sibling entries linked via `supersedes`. */
addedInSpecVersion?: SpecVersion;
removedInSpecVersion?: SpecVersion;
/** Requirement id this entry replaces (for behaviors changed by a spec release). */
supersedes?: string;
knownFailures?: readonly KnownFailure[];
deferred?: string;
}