Registry / testing / phyto
library0.1.47jsnpmunverified

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.

npm install phyto
INSTALL
IMPORT
SIG · PHYTO
P
phyto
testingjavascriptv0.1.47
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

test
import { test } from 'phyto'
import test from 'phyto'
Default import does not exist; you must use named import for DSL functions.
group
import { group } from 'phyto'
const group = require('phyto').group
ESM-only package; CommonJS require will not work. Use dynamic import if needed.
PhytoTestContext
import type { PhytoTestContext } from 'phyto'
import { PhytoTestContext } from 'phyto'
This is a TypeScript type; use `import type` to avoid runtime side effects.

Shows how to define a test group and a basic test that launches a Tauri development app, checks window visibility, and closes the app.

import { test, group } from 'phyto'; group('Tauri App Tests', () => { test('should display main window', async (context) => { const app = await context.launch({ dev: true }); const window = await app.getWindow('main'); await window.waitForVisible(); expect(await window.isVisible()).toBe(true); await app.close(); }); });
Debug
Known issues
breakingVersion 0.1.47 is pre-release, API may break without notice.
fix
Pin to a specific version and test after each upgrade.
affects: 0.x
deprecatedThe `launch` function in earlier versions required a path to the Tauri binary; now it accepts only `{ dev: true/false }`.
fix
Use `context.launch({ dev: true })` instead of `context.launch('/path/to/tauri')`.
affects: <0.1.40
gotchaThe `test` callback must be async, otherwise the harness may not wait for completion.
fix
Always declare the test callback as `async (context) => { ... }`.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'phyto'
Package not installed or missing from node_modules.
fix
Run `npm install phyto --save-dev`.
TypeError: test.group is not a function
Using `.group` on test object; `group` is a separate export.
fix
Use `import { test, group } from 'phyto'` and call `group(...)` separately.
Error: launch is not a function
Importing default instead of named export.
fix
Use `import { test } from 'phyto'` instead of `import test from 'phyto'`.
Upgrade
Version history
0.1.47latest on npm
Audit
Dependencies
taurirequiredRuntime dependency for interacting with Tauri apps
Agent activity
9 hits · last 30 days
node
8
Resources
packagephyto
phyto — npm install phyto · libregistry