Detox: Mocha 4.0.x: Test process never finishes

Created on 25 Oct 2017  路  6Comments  路  Source: wix/Detox

Description

detox test never ends. Don't have this issue in example.

Steps to Reproduce

just created react native project https://github.com/skv-headless/TestDetox

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 5.9.2
  • Node: v8.1.4
  • Device: iOS simulator
  • Xcode: 9.0.1
  • macOS: 10.12.6

Device and verbose Detox logs

2017-10-25 11:34:01.569 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Received: invoke 2017-10-25 11:34:01.931 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Sent: invokeResult 2017-10-25 11:34:01.942 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Received: reactNativeReload 2017-10-25 11:34:01.945 TestDetox[71325:928047] 鈽o笍 Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue> 2017-10-25 11:34:01.945 TestDetox[71325:928047] 鈽o笍 Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue> 2017-10-25 11:34:02.037 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Sent: ready 2017-10-25 11:34:02.050 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Received: invoke 2017-10-25 11:34:02.151 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Sent: invokeResult 2017-10-25 11:34:02.159 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Received: cleanup 2017-10-25 11:34:02.159 TestDetox[71325:928047] 鈽o笍 DETOX:: Detox Action Sent: cleanupDone

acceptebug accepteenhancement

Most helpful comment

Do you have --exit in the mocha.opts? it helped for me

All 6 comments

screen shot 2017-10-25 at 12 42 56
And it holds in this state forever.

I would love to provide more details or fix it myself. But it is hard due to compiled code (maybe you have some tip how to debug it)

I saw this behaviour with Mocha 4.0.0, which I saw that it is indeed what you use.
Until we figure out what broke , use mocha 3.5.x.

I will take the liberty to change the issue name to reflect the issue with mocha 4

Do you have --exit in the mocha.opts? it helped for me

@rotemmiz works like a charm. Thank you. Shall I leave this issue open in order to fix mocha 4.x compatibility?

Mocha now behaves (in this case) just like Jest, so this issue is also affecting Jest. This probably indicates a bug in Detox code. For now, we need to run Jest with forceExit: true.

Proposed fix is pushed to master, will be out next version.

Was this page helpful?
0 / 5 - 0 ratings