hermes-cli-invocation.test.ts 1.2 KB

1234567891011121314151617181920212223242526
  1. import { describe, expect, it } from 'vitest'
  2. import { resolveDesktopHermesCliInvocation } from '../../packages/desktop/src/main/hermes-cli-invocation'
  3. describe('desktop Hermes CLI invocation', () => {
  4. it('bypasses the uv hermes.exe trampoline on Windows', () => {
  5. expect(resolveDesktopHermesCliInvocation(
  6. 'win32',
  7. 'C:\\Users\\Administrator\\.hermes-web-ui\\desktop-runtime\\hermes\\0.15.2\\win-x64\\python\\Scripts\\hermes.exe',
  8. 'C:\\Users\\Administrator\\.hermes-web-ui\\desktop-runtime\\hermes\\0.15.2\\win-x64\\python\\python.exe',
  9. )).toEqual({
  10. command: 'C:\\Users\\Administrator\\.hermes-web-ui\\desktop-runtime\\hermes\\0.15.2\\win-x64\\python\\python.exe',
  11. argsPrefix: ['-m', 'hermes_cli.main'],
  12. })
  13. })
  14. it('keeps normal launcher execution on non-Windows platforms', () => {
  15. expect(resolveDesktopHermesCliInvocation(
  16. 'darwin',
  17. '/Users/example/.hermes-web-ui/desktop-runtime/hermes/0.15.2/mac-arm64/python/bin/hermes',
  18. '/Users/example/.hermes-web-ui/desktop-runtime/hermes/0.15.2/mac-arm64/python/bin/python3',
  19. )).toEqual({
  20. command: '/Users/example/.hermes-web-ui/desktop-runtime/hermes/0.15.2/mac-arm64/python/bin/hermes',
  21. argsPrefix: [],
  22. })
  23. })
  24. })
粤ICP备19079148号