Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`testFailed` does not work with detox@20

Open
#7 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

Research direction

Start with the afterEach snippet in the issue and check how the example application integrates Detox 20 and exposes test-failure state. Reproduce the ReferenceError, then verify that the failed-test screenshot behavior works and the E2E tests still pass.

Written by the indexing model from the issue text.

Description

Thanks for the example application.
Currently I am facing the error ReferenceError: testFailed is not defined while running my tests
If I comment testFailed flag in the below code everything is working fine but missing the feature of only taking screenshot for failed test cases.

here is my code, please suggest how to solve this issue.

ReferenceError: testFailed is not defined

  1 |
  2 | afterEach(async () => {
> 3 |     if (testFailed) {
    |     ^
  4 |       await device.takeScreenshot('screenshot');
  5 |     }
  6 | });
Dominant language
Java
Stars
34
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from expo/eas-tests-example

All issues in expo/eas-tests-example

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.