TypeScript SDK
Testing
Test device workflows without launching a simulator.
Create a fake backend
import { FakeBackend, el, screen } from "@phone-use/sdk/testing";
const backend = new FakeBackend({
screens: [
screen([
el({ ref: "1", role: "Button", label: "General" }),
]),
],
});Included utilities
| Utility | Purpose |
|---|---|
| FakeBackend | Play scripted screens and record calls |
| el | Create an observed-element fixture |
| screen | Create a snapshot fixture |
| scriptedExecRunner | Test lifecycle and command execution paths |