Where to find `testSummary` mentioned in Detox test life cycle docs
See original GitHub issueDescription
I am trying to enable video and screenshot artifacts for my Detox tests, and have bounced around the various pages and added detox.beforeEach
and detox.afterEach
as per this page.
I am not sure exactly how I am meant to get this testSummary
value from within the init.ts
of my tests, and the link provided 404s, and I can’t find the equivalent file in that directory.
Apologies if I have missed the page answering this, but have looked around everywhere and many links are broken or docs are missing. Would really appreciate learning how to get that testSummary
from within the context on my beforeEach
within my init file. Thanks!
Your environment
Detox version: 19.5.8 React Native version: 0.67 Node version: 16.1.0 Device model: n/a OS: macOS Monterey Test-runner (select one): jest
Issue Analytics
- State:
- Created a year ago
- Comments:5
No worries, @RhyG , you can ask questions, as the docs might be out of sync on this topic. I am just not 100% sure what you are trying to achieve. Search for DetoxCoreListener in our codebase - you’ll see that we forward Jest environment events (including so-called beforeEach/afterEach) to those Detox lifecycle handlers.
Yep I am that far and able to access it in the custom path builder, but from what I can tell from the docs that test summary is dynamically updated based on what you pass to
detox.beforeEach()
anddetox.afterEach()
so I was trying to find out how to get the current test information (test name, status etc) in order to generate that test summary and pass it to them. I am not currently using the Jasmine adapters I have seen in some docs so will try that.I will just close this and keep searching the docs. Thanks a lot for the help. 😃