Skip to content

Commit 95449f9

Browse files
authored
Fix that defaultOptions.targetForVariableExpansion are not copied to generated test plan (#47)
* Write generated test plan with sorted keys to mimic Xcode * Parse DefaultOptions.targetForVariableExpansion
1 parent 2c35a4c commit 95449f9

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Sources/TestConfigurator/xctestplanner/Core/Entity/TestPlanModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public struct DefaultOptions: Codable {
4040
public var testRepetitionMode: String?
4141
public var maximumTestRepetitions: Int?
4242
public var maximumTestExecutionTimeAllowance: Int?
43+
public var targetForVariableExpansion: Target?
4344
}
4445

4546
// MARK: - CommandLineArgumentEntry

Sources/TestConfigurator/xctestplanner/Core/Helper/TestPlanHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class TestPlanHelper {
2222
static func writeTestPlan(_ testPlan: TestPlanModel, filePath: String) throws {
2323
Logger.message("Writing updated test plan to file: \(filePath)")
2424
let encoder = JSONEncoder()
25-
encoder.outputFormatting = .prettyPrinted
25+
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
2626
let updatedData = try encoder.encode(testPlan)
2727

2828
let url = URL(fileURLWithPath: filePath)

0 commit comments

Comments
 (0)