This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testErrorAndThenSucceed() { | |
let divisor = DivisorMock() | |
let vm = ViewModel(divisor: divisor.divide) | |
vm.load() | |
// nah ini kan gagal hit pertama | |
// ini ga perlu dites kan? | |
vm.load() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trainer --path ${path_to_xctestrun_or_TestSummaries.plist} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcodebuild test-without-building -xctestrun ${xctestrunfile} | |
-derivedDataPath ${testResultDerivedData} | |
-destination 'platform=iOS Simulator,name=${preferred phone}' | |
-only-testing:"${bundle test}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lane :build_for_test do | |
cocoapods(repo_update: true) | |
scan( | |
workspace: "your.xcworkspace", | |
scheme: "your_scheme", | |
should_zip_build_products: true, | |
build_for_testing: true, | |
device: "your_preferred_device | |
) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function simCommand (command:string, timeout:number, args:Array = [], env = {}, executingFunction = exec) { | |
// run a particular simctl command | |
args = [command, ...args]; | |
// Prefix all passed in environment variables with 'SIMCTL_CHILD_', simctl | |
// will then pass these to the child (spawned) process. | |
env = _.defaults(_.mapKeys(env, function(value, key) { | |
return `SIMCTL_CHILD_${key}`; | |
}), process.env); | |
try { |