Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions LinuxDummyTests/LinuxDummyTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import XCTest
#if os(Linux)
import Testing
@testable import GoogleGenerativeAI

final class LinuxDummyTests: XCTestCase {
func testExample() {
XCTAssertTrue(true)
@Suite("Environment Configuration")
struct EnvironmentConfigurationTests {
@Test("default headers and configuration")
func environmentConfiguration() {
let env = AI.GoogleGenAI.Environment(apiKey: "test-key")
let headers = env.headers

#expect(env.baseURLString == "generativelanguage.googleapis.com")
#expect(env.apiVersion == "v1beta")
#expect(headers["x-goog-api-key"] == "test-key")
#expect(
headers["x-goog-api-client"] ==
"genai-swift/\(String(describing: env.clientVersion))"
)
#expect(headers["Content-Type"] == "application/json")
}
}
#endif