Tests in the window
The failed tests of your own last run, with the failure, Open in Code and Attach to message. Parallax reads the results file and never runs your tests.
The Tests tab of the Services panel shows the results of a test run you made. Parallax never runs your tests: it reads the results file your run wrote and shows the failed tests. The tab's How this works ↗ opens this page.
Write the results file
Run Jest with JSON output to a file:
npx jest --json --outputFile=jest-results.jsonAdd it as a script so you run it the same way each time, and keep the file out of git:
"scripts": {
"test:results": "jest --json --outputFile=jest-results.json"
}jest-results.jsonAdd --testLocationInResults so a failed test has a line, and Open in Code can open it there.
Other runners: JUnit XML
Maestro, Detox (through jest-junit) and fastlane can write JUnit XML. Write it to one of:
junit.xmltest-results/junit.xmlreports/junit.xml
jest-junit needs addFileAttribute: "true" to name the file of each test. A failed Maestro flow has no file and line, so it has no Open in Code.
What the tab shows
- The head: how many tests failed or passed, the runner (Jest or JUnit), the file it read and how long ago it was written.
- The failed tests, each with its file and line. A click opens the failure message.
- On an opened test: Open in Code (when the test has a line) and Attach to message, which puts the test's name, its file and line and the failure into your message to the agent. Nothing is sent until you press Send to agent.
- At most 300 tests are listed, failed first.
The chip is red with the number of failures (Tests 2 ✕) and green when everything passed. With no results file there is no chip; the tab says so and shows the command with Copy.
Which file, and when
- The window reads the newest of
jest-results.json,test-results/junit.xml,junit.xmlandreports/junit.xmlin the project folder. - A file over 5 MB, or a link that points out of the project folder, is refused.
- It reads again every 20 seconds and when you open the tab.
- Jest writes the file once, at the end of the run. A file written in the last 1.5 seconds may still be being written, so the window waits a moment and reads it again.
- A deleted results file clears the tab: old failures do not stay red.
Limits
- The results are as old as your last run. The tab shows the file's age; run the tests again after a change.
- The window has no Run tests button.
GitHub in the window
The pull request of the current branch and its checks, a failed step's log for the agent, a draft pull request from the window, and switching the branch.
Linear and Jira in the window
The issue the current branch is for, read from Linear or Jira Cloud by the key in the branch name, and how to connect each tracker.