add EXAMPLE=folder-name support for tests & basic-host (#292)

* add EXAMPLE=folder-name support for tests & basic-host

* style: format e2e test files

* style: format threejs-server files
This commit is contained in:
Olivier Chafik 2026-01-19 20:16:37 +00:00 • committed by GitHub
commit 801e1b043a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,8 +30,11 @@ const SKIP_SERVERS = new Set([
"video-resource", // Uses custom screenshot from PR comment
]);
// Optional: filter to a single example via EXAMPLE env var (folder name)
const EXAMPLE_FILTER = process.env.EXAMPLE;
// Server configurations (excludes integration-server which is for E2E testing)
const SERVERS = [
const ALL_SERVERS = [
{
key: "basic-react",
name: "Basic MCP App Server (React)",
@ -55,7 +58,6 @@ const SERVERS = [
{ key: "map-server", name: "Map Server", dir: "map-server" },
{ key: "pdf-server", name: "PDF Server", dir: "pdf-server" },
{ key: "qr-server", name: "QR Code Server", dir: "qr-server" },
{ key: "say-server", name: "Say Demo", dir: "say-server" },
{
key: "scenario-modeler",
name: "SaaS Scenario Modeler",
@ -82,6 +84,11 @@ const SERVERS = [
{ key: "wiki-explorer", name: "Wiki Explorer", dir: "wiki-explorer-server" },
];
// Filter servers if EXAMPLE is specified
const SERVERS = EXAMPLE_FILTER
? ALL_SERVERS.filter((s) => s.dir === EXAMPLE_FILTER)
: ALL_SERVERS;
/**
* Wait for the MCP App to load inside nested iframes.
*/