quiesco init
Sets Quiesco up in an Expo project. Every step reports what it did; existing files are never
overwritten — when a file needs a change Quiesco cannot make safely, it prints what to add. On an app below
Expo SDK 55 it warns (Quiesco supports SDK 55 and later) and sets the project up anyway.
First it asks which test runner to use: Vitest (preselected), Jest or Cucumber (test runners).
--runner answers the question beforehand; when nobody is at the terminal (CI), it takes Vitest.
-
Installs the packages with the project’s package manager (npm, pnpm, yarn or bun, from the lock file):
@quiesco/agent,@quiesco/nativeas dependencies;quiesco,@quiesco/core,@quiesco/expo-plugin, the runner’s packages (@quiesco/vitestandvitest,@quiesco/jestandjest, or@quiesco/cucumberand@cucumber/cucumber), and@quiesco/web,playwrightfor the web as dev dependencies. The Quiesco packages are installed at the version of the CLI that runsinit(npx quiesco@0.4.0 initinstalls 0.4.0), so the scripts it writes match the installed CLI. After the install,initreads the installed versions back and stops with the install commands to run when one differs (for example when the package manager resolved from stale registry metadata). -
Adds
@quiesco/expo-pluginto the plugins inapp.json, and the app IDs it lacks:ios.bundleIdentifier,android.package(bothcom.anonymous.<slug>) andscheme(the slug), so the build andquiesco.config.mtsname the same app. Without them,expo prebuildpicks its own defaults, which differ between iOS and Android. With anapp.config.js/.tsit lists them as a step for you instead. -
Creates
metro.config.jswithwithQuiesco()(or explains how to wrap an existing one). -
Makes
@quiesco/agentthe first import of the entry file. Expo Router apps get anindex.ts(import '@quiesco/agent'; import 'expo-router/entry';) and"main": "index.ts". When the entry registers a local component (registerRootComponent(App), as in the blank templates),initalso wraps that component in<QuiescoRoot>there. -
Writes
quiesco.config.mts(bundle id, package and scheme taken fromapp.json), the runner’s config with a first test, ande2e:*scripts:When the project already has a Vitest or Jest config (its unit tests’), that one stays as it is: Quiesco’s goes next to it asvitest.e2e.config.mts/jest.e2e.config.cjs, and thee2e:*scripts pass--configwith its name.
What
init leaves to you: test ids, and wrapping the root layout in <QuiescoRoot> in Expo Router apps (and other entries it cannot change safely); init lists what is left.
Upgrading a project
quiesco init to the version of the CLI that runs it:
- Installs every Quiesco package at that version, also ones
initdoes not add (such as@quiesco/steps), and reads the versions back asinitdoes. Exact versions ("quiesco": "0.10.0") stay exact; ranges stay ranges. The runners themselves (vitest,jest,@cucumber/cucumber) andplaywrightare left alone. - Removes
paths: ['features/**/*.feature']from the cucumber config. Older versions wrote it; with it,quiesco test features/x.featureran every feature. - Adds
"allowImportingTsExtensions": truetotsconfig.json. - Writes the app IDs
app.jsonlacks (as in step 2 above) and replaces the// TODO: expo.…placeholders inquiesco.config.mtswith them. - Wraps
registerRootComponent(App)in<QuiescoRoot>. Thee2e:*scripts are left as they are (one you removed stays removed); it names the onesinitwould add.
paths you set yourself, a tsconfig.json with
comments, an app.config.js / .ts) is listed with what to do. Running it again changes nothing. The
platforms come from quiesco.config.mts (or --platforms). Run npx quiesco doctor afterwards.
quiesco build
expo prebuild with EXPO_PUBLIC_QUIESCO=1, then xcodebuild for the simulator or
gradlew assembleDebug / assembleRelease) and writes it to apps.<platform>.binaryPath. On iOS the
derived data path, configuration and scheme come from that path
(<dir>/Build/Products/<Configuration>-iphonesimulator/<Name>.app). A Debug build is skipped when the app
config and the dependencies (with their installed versions) did not change since the last one and the build
is still there; --force builds anyway. Release builds embed the JS bundle and are always built.
--clean runs expo prebuild --clean: ios/ / android/ are deleted and generated again, so changes made
by hand in them are lost. Use it after removing a native module or when the native project is in a bad
state; it always builds.
quiesco test
QUIESCO_PLATFORM and runs the project’s test runner — vitest run, jest or cucumber-js; all
other arguments are passed to it unchanged. Without --runner vitest|jest|cucumber it runs the one whose
Quiesco package (@quiesco/vitest, @quiesco/jest, @quiesco/cucumber) is installed; with several or none
installed, cucumber-js. Everything after -- goes to
the runner too, and the -- itself is dropped, so Quiesco’s own option names there belong to the runner
(quiesco test -- --help shows the runner’s help). --workers N runs N workers,
each on a device of its own (parallel.md): it becomes --parallel N for cucumber-js,
--maxWorkers N for Jest and --fileParallelism --maxWorkers N for Vitest (the runners’ own flags work as
well).
On a terminal, a progress bar stays on the last line while the runner’s output scrolls above it: done /
total, passed, failed and skipped, the time so far and the test running now (one per device with several
workers). The runner sends it the progress: quiesco test adds @quiesco/cucumber’s formatter to
cucumber-js by itself, Vitest needs quiescoPlugin() and Jest gets it from the preset
(test runners); without it, a hint at the end says what to add. --no-progress or
QUIESCO_PROGRESS=0 turns the bar off; it is off in CI and when the output is not a terminal. The exit code
is the runner’s.
When the app loads its JS from Metro (devClient.metroUrl, or apps.web.url) and nothing answers there,
quiesco test starts Metro with EXPO_PUBLIC_QUIESCO=1 (npx expo start --port <port>, its output in
artifacts/metro.log), waits until it is ready, and stops it when the runner ends, also on Ctrl-C. A Metro
that is already running is used as it is. devServer in the config changes the command and the timeout,
or turns this off (autoStart: false). Running the runner directly (npx vitest run) does not start Metro.
quiesco ui
@quiesco/ui in the project. --platform, --runner,
--workers and the runner’s arguments work as for quiesco test; --port N chooses the port and
--no-open does not open the browser. Metro stays up while it runs; Ctrl-C stops it.
quiesco list
quiesco test), by file with their lines, without
running them or starting a device. cucumber-js does a dry run with its formats left out (report files stay as they are), Vitest parses the
files, and Jest collects the tests without Quiesco’s test environment and the project’s global setup (setup
files still run). --json prints the list with the test ids the progress bar and the test UI use. The exit
code is 1 when nothing could be listed.
quiesco devices
"<name> (Quiesco N)" simulators and <avd>_quiesco_N AVDs (with [running] when they are);
--prune deletes them. The next parallel run creates them again; your own devices are never touched.
quiesco doctor
quiesco <command> in the package.json scripts exists, config plugin, withQuiesco() in Metro, the agent as the
entry’s first import, <QuiescoRoot>, the config file), the app IDs (quiesco.config.mts against
app.json and the builds, and placeholders left by init; with an app.config.js / .ts, against the config
npx expo config resolves), settings older versions wrote (paths in the
cucumber config; .ts imports in step files without allowImportingTsExtensions), the platform tools
(simulators, adb and AVDs, the configured Playwright browser), the app builds and the port. Each problem comes with the
fix; most of what an older setup lacks is fixed by npx quiesco@latest init --upgrade. Exits with 1 when a
required check fails; warnings and notes (ℹ️, such as a missing e2e:build:* script) do not fail.
Tests in a package of their own
When the tests are not in the Expo app’s directory (a monorepo, orapp/ and e2e/ side by side), put
quiesco.config.mts, the runner and its packages in the test package and point appDir at the app,
relative to the config file:
doctor checks the app (Expo, @quiesco/agent, the config plugin, Metro,
the entry, <QuiescoRoot>, app.json) in appDir and the test setup (the runner the test package has, the config,
the scripts) where it runs, with the Quiesco packages of both at one version. build runs expo prebuild and
xcodebuild / gradle in appDir; binaryPath stays relative to the config file. init --upgrade upgrades
@quiesco/agent, @quiesco/native and @quiesco/expo-plugin in the app and the other packages in the test
package. quiesco test starts Metro in appDir. --app-dir <dir> (doctor, build, init --upgrade) names the
app without the config.
quiesco tree
#testID, text and [role] per element —
to find the matchers for your steps:
--launch boots the device and launches the app first, like a test run. --timeout <ms>
sets how long to wait for the app.