2017-11-15 1 views
0

아직 detox에 익숙하지 않은 이유는 package.json에서 한 명령이 작동하고 다른 명령에서는 작동하지 않는 이유입니다.Detox 5.10.0 Jest 러너에 매달려

ReactNative 프로젝트
[email protected]
하나 개 해독 구성 :

"jest": { 
    "preset": "react-native", 
    "setupTestFrameworkScriptFile": "./e2e/init.js" 
}, 
"detox": { 
    "configurations": { 
     "ios.sim.debug": { 
      "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/todoApp.app", 
      "build": "xcodebuild -project ios/todoApp.xcodeproj -scheme todoApp -configuration Debug -sdk iphonesimulator", 
      "type": "ios.simulator", 
      "name": "iPhone X" 
     } 
    } 
} 

사례 1. 테스트 작업.

"scripts": { 
    "test:e2e:ios": "jest e2e" 
} 

사례 2. 시험 작동하지 않는다.

"scripts": { 
    "test:e2e:ios": "detox test -r jest -c ios.sim.debug" 
} 

시험은 걸려. 경우 2

로그의 꼬리 :

rbx 
Timed: animateWithDuration:delay:options:animations:completion: 
Dispatch Queue: com.apple.main-thread 
send: {"type":"currentStatus","params":{},"messageId":27} 
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e) 
role=testee action=currentStatusResult (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e) 
onMessage: {"type":"currentStatusResult","messageId":27,"params":{"state":"busy","resources":[{"name":"Timed","info":{"endTrackingDate":"Friday, January 2, 1970 at 6:12:58 PM Moscow Standard Time","object":"<NSObject: 0x604000205e80>","name":"animateWithDuration:delay:options:animations:completion:","prettyPrint":"animateWithDuration:delay:options:animations:completion:","duration":0.7256049871444702}},{"name":"Dispatch Queue","info":{"queue":"<OS_dispatch_queue_main: com.apple.main-thread[0x109c7cdc0] = { xref = -2147483648, ref = -2147483648, sref = 1, target = com.apple.root.default-qos.overcommit[0x109c7e300], width = 0x1, state = 0x001ffe9e00000300, dirty, max qos 6, in-flight = 0, thread = 0x303 }>","prettyPrint":"com.apple.main-thread"}}],"messageId":27}} 
    rbx 
Timed: animateWithDuration:delay:options:animations:completion: 
Dispatch Queue: com.apple.main-thread 
send: {"type":"currentStatus","params":{},"messageId":28} 
role=tester action=currentStatus (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e) 
role=testee disconnect (sessionId=6c6513a7-1684-65fd-de53-7b4be949dc5e) 

문제 문제는 내가 (예를 들어, 안드로이드에 대한.) 여러 구성에 대한 첫 번째 경우를 사용할 수 없습니다

암의 I,이다 잘못 한거야? 너 좀 봐 줄래?

+0

현재이 작업이 진행 중입니다. 곧 업데이트 될 예정입니다. –

+0

이것은 해독 6.0.0에서 해결되었습니다 – Rotemmiz

답변

1

@Rotemmiz가 말한 것처럼, 이것은 5.X 버전의 detox에서 계속되는 문제 였고, 6.X 버전에서 해결되어야합니다.

+0

이제 "test-runner"로 case 2에서 실행할 수 있습니다 : package.json conf에 "jest". 고맙습니다! –

관련 문제