Detox v20 - custom environment can't call super.handleTestEvent
See original GitHub issueWhat happened?
I’ve just updated our project to Detox v20 and was following this guide: https://wix.github.io/Detox/docs/config/testRunner/#jest-config
It incorrectly shows how you can override handleTestEvent
. This is the proposed approach:
async handleTestEvent(event, state) {
await super.handleTestEvent(event, state);
// custom code
}
however this is not working, you need to do it like this:
handleTestEvent = async (event, state) => {
await super.handleTestEvent(event, state);
// custom code
}
if you need I can create a PR to update the docs to correctly reflect this, or to update the testEnvironment
file to match the documentation.
What was the expected behaviour?
No response
Was it tested on latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: React Native version: Node version: Test-runner (select one): jest / other
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste logs here!
More data, please!
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:6
Top Results From Across the Web
Detox : Please add both arguments to super() call in your ...
If you replace constructor and super with the new syntax. class CustomDetoxEnvironment extends DetoxCircusEnvironment {. constructor(config) { ...
Read more >Migration Guide | Detox
Otherwise, stay with your custom test environment but make sure to migrate it as was described earlier. Stop using timeline artifacts. If you...
Read more >Detox - bytemeta
Detox repo issues. ... Detox v20 breaks Cucumber tests integration. daankennes ... Detox v20 - custom environment can't call super.handleTestEvent.
Read more >Wix Detox Statistics & Issues - Codesti
Wix Detox: Gray box end-to-end testing and automation framework for mobile apps Check out Wix Detox ... Detox v20 - custom environment can't...
Read more >Wix from Detox repository issues - Github Lab
View Comments (6). User Image open adamivancza Updated 2 weeks ago. Detox v20 - custom environment can't call super.handleTestEvent · View Comments (5) ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the suggestion. Well, I have a vacation currently. I’ll be able to handle this next week.
any update on this @noomorph ?