{"id":41723,"library":"phyto","title":"Phyto","description":"Phyto is an end-to-end testing framework for Tauri applications, providing a DSL with `test` and `group` functions and a per-test Node harness. It integrates directly with Tauri's runtime to enable seamless automated UI and backend testing. The current stable version is 0.1.47, released as a lightweight alternative to Specta and Playwright for Tauri projects, with native TypeScript support and minimal configuration. Development is active, with frequent updates addressing Tauri version compatibility.","status":"active","version":"0.1.47","language":"javascript","source_language":"en","source_url":"https://github.com/coniferous-dev/phyto","tags":["javascript","phyto","tauri","testing","e2e","end-to-end","test-framework","typescript"],"install":[{"cmd":"npm install phyto","lang":"bash","label":"npm"},{"cmd":"yarn add phyto","lang":"bash","label":"yarn"},{"cmd":"pnpm add phyto","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime dependency for interacting with Tauri apps","package":"tauri","optional":false}],"imports":[{"note":"Default import does not exist; you must use named import for DSL functions.","wrong":"import test from 'phyto'","symbol":"test","correct":"import { test } from 'phyto'"},{"note":"ESM-only package; CommonJS require will not work. Use dynamic import if needed.","wrong":"const group = require('phyto').group","symbol":"group","correct":"import { group } from 'phyto'"},{"note":"This is a TypeScript type; use `import type` to avoid runtime side effects.","wrong":"import { PhytoTestContext } from 'phyto'","symbol":"PhytoTestContext","correct":"import type { PhytoTestContext } from 'phyto'"}],"quickstart":{"code":"import { test, group } from 'phyto';\n\ngroup('Tauri App Tests', () => {\n  test('should display main window', async (context) => {\n    const app = await context.launch({ dev: true });\n    const window = await app.getWindow('main');\n    await window.waitForVisible();\n    expect(await window.isVisible()).toBe(true);\n    await app.close();\n  });\n});","lang":"typescript","description":"Shows how to define a test group and a basic test that launches a Tauri development app, checks window visibility, and closes the app."},"warnings":[{"fix":"Pin to a specific version and test after each upgrade.","message":"Version 0.1.47 is pre-release, API may break without notice.","severity":"breaking","affected_versions":"0.x"},{"fix":"Use `context.launch({ dev: true })` instead of `context.launch('/path/to/tauri')`.","message":"The `launch` function in earlier versions required a path to the Tauri binary; now it accepts only `{ dev: true/false }`.","severity":"deprecated","affected_versions":"<0.1.40"},{"fix":"Always declare the test callback as `async (context) => { ... }`.","message":"The `test` callback must be async, otherwise the harness may not wait for completion.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.47':49 'activ':71 'address':75 'altern':54 'applic':13 'autom':39 'backend':42 'compat':78 'configur':68 'current':45 'develop':69 'direct':31 'dsl':16 'e2e':83 'enabl':37 'end':6,8,85,87 'end-to-end':5,84 'framework':10,90 'frequent':73 'function':21 'group':20 'har':28 'integr':30 'javascript':79 'lightweight':53 'minim':67 'nativ':63 'node':27 'per':25 'per-test':24 'phyto':1,2,80 'playwright':58 'project':61 'provid':14 'releas':50 'runtim':35 'seamless':38 'specta':56 'stabl':46 'support':65 'tauri':12,33,60,76,81 'test':9,18,26,43,82,89 'test-framework':88 'typescript':64,91 'ui':40 'updat':74 'version':47,77","created_at":"2026-06-04T18:53:47.876875+00:00","updated_at":"2026-06-04T18:53:47.876875+00:00","problems":[{"fix":"Run `npm install phyto --save-dev`.","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'phyto'"},{"fix":"Use `import { test, group } from 'phyto'` and call `group(...)` separately.","cause":"Using `.group` on test object; `group` is a separate export.","error":"TypeError: test.group is not a function"},{"fix":"Use `import { test } from 'phyto'` instead of `import test from 'phyto'`.","cause":"Importing default instead of named export.","error":"Error: launch is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/coniferous-dev/phyto#readme","github":"https://github.com/coniferous-dev/phyto","docs":null,"changelog":null,"pypi":null,"npm":"phyto","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}