{"id":25914,"library":"maests","title":"Maests","description":"Maests (v2.8.6) is a TypeScript executable compiler that transforms TypeScript flows into Maestro-compatible YAML for mobile end-to-end testing. It supports modular flow composition, automatic .env loading, type-safe runScript, and direct YAML output. Active development with frequent releases (weekly/monthly). Differentiator: TypeScript-first, composable modules, and runScript type safety versus plain YAML or maestro-ts.","status":"active","version":"2.8.6","language":"javascript","source_language":"en","source_url":"https://github.com/shoma-mano/maests","tags":["javascript","maestro","e2e","typescript","testing","React Native"],"install":[{"cmd":"npm install maests","lang":"bash","label":"npm"},{"cmd":"yarn add maests","lang":"bash","label":"yarn"},{"cmd":"pnpm add maests","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for logging output","package":"consola","optional":true}],"imports":[{"note":"Named export only; M is not a default export. ESM/CJS compatible.","wrong":"import M from 'maests' || const M = require('maests')","symbol":"M","correct":"import { M } from 'maests'"},{"note":"Named export from top-level package.","wrong":"import { getOutput } from 'maests/commands' || require('maests').getOutput","symbol":"getOutput","correct":"import { getOutput } from 'maests'"},{"note":"Must call as method on M object, not standalone.","wrong":"initFlow({ appId: '...' })","symbol":"M.initFlow","correct":"M.initFlow({ appId: 'com.example.app' })"}],"quickstart":{"code":"// First, install: pnpm add -D maests\n// Create my-test.ts:\nimport { M, getOutput } from 'maests';\nM.initFlow({ appId: 'com.example.app' });\nM.tapOn('welcome_button');\nM.assertVisible({ id: 'welcome_label' });\n// Run: npx maests my-test.ts\n","lang":"typescript","description":"Basic usage: initialize a flow with appId, tap an element, and assert visibility."},"warnings":[{"fix":"Update Maestro to >=1.20","message":"Version 2.0 dropped support for older Maestro versions (<1.20)","severity":"breaking","affected_versions":">=2.0 <2.0"},{"fix":"Use regular function expressions for callbacks that reference 'this'","message":"runScript callbacks must be functions, not arrow functions if using 'this'","severity":"gotcha","affected_versions":">=2.8.0"},{"fix":"Restart maests after modifying .env","message":"Environment variables from .env are loaded only once at start; changing .env during test won't be reflected","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Use M.tapOn({ text: '...' }) instead","message":"Older M.xxx syncing methods like M.tapOnText will be removed in v3","severity":"deprecated","affected_versions":">=2.8.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run pnpm install or npm install, ensure maests is in package.json devDependencies","cause":"maests is installed as a dev dependency but not in node_modules","error":"Error: Cannot find module 'maests'"},{"fix":"Use import { M } from 'maests'","cause":"Importing M incorrectly (default import instead of named import)","error":"TypeError: M.initFlow is not a function"},{"fix":"Install Maestro CLI from https://maestro.mobile.dev/getting-started/installing-maestro","cause":"Maestro CLI not installed or not on PATH","error":"Error: Maestro not found. Please install Maestro CLI"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}