Skip to content

Commit ed91077

Browse files
committed
Test actual CLI binary in e2e tests, not just the script
1 parent eb22099 commit ed91077

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"start:dev": "tsx ./build-setup/skip-server.ts && cross-env HTK_DEV=true APP_URL='http://localhost:8080' npm run start:app",
2020
"start:app": "tsc-watch --onSuccess \"electron .\"",
2121
"build:cli": "tsx ./build-setup/build-cli.ts",
22-
"test": "npm run server:setup && npm run build:src && npm run test:unit && npm run test:smoke",
22+
"test": "npm run server:setup && npm run build:src && npm run test:unit && npm run build:cli && npm run test:smoke",
2323
"test:unit": "node --experimental-strip-types --import ./test/register-stubs.js --test test/ui-bridge.spec.ts",
2424
"test:smoke": "playwright test"
2525
},

test/mcp-e2e.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ test('MCP server exposes UI operations as tools', async () => {
133133

134134
// --- MCP protocol test via CLI ---
135135

136-
mcpProcess = spawn('node', [
137-
path.join(import.meta.dirname, '..', 'build', 'cli', 'cli.cjs'),
138-
'mcp'
139-
], {
136+
const cliBinary = path.join(import.meta.dirname, '..',
137+
'httptoolkit-cli' + (process.platform === 'win32' ? '.exe' : '')
138+
);
139+
mcpProcess = spawn(cliBinary, ['mcp'], {
140140
stdio: ['pipe', 'pipe', 'pipe']
141141
});
142142

0 commit comments

Comments
 (0)