fix: 修复 OpenCode 运行时启动与本地打包
This commit is contained in:
10
tests/unit/playwright-mcp.test.ts
Normal file
10
tests/unit/playwright-mcp.test.ts
Normal 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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user