2017-11-15 12 views
0

まだ解毒していないので、package.jsonで1つのコマンドが動作し、別のコマンドで動作しない理由を理解しようとしています。Detox 5.10.0 Jestランナーでぶら下げ

ReactNativeプロジェクト
[email protected]
1つのデトックス構成:

"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

これはDetox 6.0.0で解消されました – Rotemmiz

答えて

1

@Rotemmizによれば、これは5.Xバージョンのdetoxで進行中の問題であり、6.Xリリースで解決されるはずです。

+0

これでcase 2の "test-runner"で実行できます:package.json confの "jest"。ありがとうございました! –

関連する問題