@quiesco/jest is a Jest preset. Tests reach the app through the global quiesco, like Jest’s own test
and expect. It needs Jest 30 or later.
Setup
quiesco init --runner jest installs @quiesco/jest and jest, and writes two files:
jest.config.*, or "jest" in
package.json), init writes Quiesco’s config to jest.e2e.config.cjs instead, and the e2e:* scripts
pass --config jest.e2e.config.cjs.
The preset
preset: '@quiesco/jest' sets three things:
What your config sets
A preset cannot set these two, so your config does:1 runs the files one at a time. N runs them on N devices in parallel, one per worker process
(parallel runs). --maxWorkers N on the command line overrides it.Timeout of each test, in ms. Each Quiesco call waits for the app to become idle, so leave room for that,
e.g.
120_000.transform: {} turns off Babel, so plain JavaScript test files run as they are.
Your own reporters or teardown
Jest replaces a preset’s option with the config’s instead of merging them:reporters: add'@quiesco/jest/reporter'to your list, next to'default'. Without it, the tests still run, butquiesco testshows no progress.globalTeardown: call Quiesco’s from yours, or devices and apps are left running:
Writing tests
quiesco.app: the Driver.quiesco.session: the session, for what the Driver does not cover.
describe title:
quiesco global to tsconfig.json:
Running
quiesco test sets QUIESCO_PLATFORM and runs jest; other arguments go to Jest
(quiesco test). Running npx jest yourself also works with QUIESCO_PLATFORM
set, but then Metro is not started for you.