[ Documentation ]
rnx detox

rnx detox

rnx detox

Drop-in Detox runner. Existing import from 'detox' suites run unchanged via a Jest moduleNameMapper rewrite: no code edits, no config churn. Auto-launches an rnx shell if none is running.

terminal
rnx detox [options] [-- <jest args>]

Options

flagdescription
--config <path>use a specific jest config instead of the default
--watchjest watch mode
--headedkeep the rnx shell window visible
-t <pattern>pass a Jest —testNamePattern
--no-launchskip auto-launching an rnx shell (manage it yourself)

Examples

terminal
rnx detox
rnx detox --watch
rnx detox -t "login flow"
rnx detox --headed

Drop-in Detox

rnx detox runs your existing Detox test suite against rnx with no code changes. It auto-launches an rnx shell, sets up the Jest module mapping (^detox$rnxsim/detox), and runs your tests.

terminal
rnx detox # discover e2e/ and run
rnx detox init # scaffold config + sample test
rnx detox --watch # jest watch mode
rnx detox -t "login" # filter by name

Users can also add preset: 'rnxsim/detox' to their own Jest config to run tests via plain npx jest.