fix: 修复 OpenCode 运行时启动与本地打包

This commit is contained in:
2026-08-09 00:02:49 +08:00
parent d092132d86
commit a6fe14a8d6
20 changed files with 1847 additions and 154 deletions

View File

@@ -0,0 +1,10 @@
import { describe, expect, it } from 'vitest';
import { resolvePlaywrightMcpServer } from '@electron/opencode/playwright-mcp';
describe('Playwright MCP runtime resolution', () => {
it('fails closed instead of falling back to npx when the local package is missing', () => {
expect(() => resolvePlaywrightMcpServer(() => {
throw new Error('missing package');
})).toThrow('Bundled @playwright/mcp is missing');
});
});