feat: Adding documentation comments.
All checks were successful
CI / Run Tests (push) Successful in 2m17s
All checks were successful
CI / Run Tests (push) Successful in 2m17s
This commit is contained in:
@@ -141,6 +141,27 @@ struct ConfigurationClientTests: TestCase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
func writeCreatesBackupFile() async throws {
|
||||
try await withDependencies {
|
||||
$0.fileClient = .liveValue
|
||||
} operation: {
|
||||
let client = ConfigurationClient.liveValue
|
||||
|
||||
try await withGeneratedConfigFile(named: "config.toml", client: client) { configFile in
|
||||
@Dependency(\.fileClient) var fileClient
|
||||
|
||||
let backupUrl = configFile.url.appendingPathExtension(".back")
|
||||
#expect(fileClient.fileExists(backupUrl) == false)
|
||||
|
||||
let config = Configuration()
|
||||
try await client.write(config, to: configFile)
|
||||
|
||||
#expect(fileClient.fileExists(backupUrl))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func generateFindEnvironments(file: File) -> [[String: String]] {
|
||||
|
||||
Reference in New Issue
Block a user