Skip to content

Commit 845e170

Browse files
BobaFettersgh-action-runner
authored andcommitted
Making import of schema module in test mock files @testable (#697)
1 parent 5862bee commit 845e170

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Tests/ApolloCodegenTests/CodeGeneration/Templates/TemplateRenderer_TestMockFile_Tests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class TemplateRenderer_TestMockFile_Tests: XCTestCase {
119119
for test in tests {
120120
let expected = """
121121
import ApolloTestSupport
122-
import \(test.importModuleName)
122+
@testable import \(test.importModuleName)
123123
124124
"""
125125
let config = buildConfig(moduleType: test.schemaTypes, operations: test.operations)
@@ -137,7 +137,7 @@ class TemplateRenderer_TestMockFile_Tests: XCTestCase {
137137
// given
138138
let expected = """
139139
import ApolloTestSupport
140-
import TestSchema
140+
@testable import TestSchema
141141
142142
"""
143143
let config = buildConfig(

apollo-ios-codegen/Sources/ApolloCodegenLib/Templates/TemplateRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ struct ImportStatementTemplate {
355355
static func template(for config: ApolloCodegen.ConfigurationContext) -> TemplateString {
356356
return """
357357
import ApolloTestSupport
358-
import \(config.schemaModuleName)
358+
@testable import \(config.schemaModuleName)
359359
"""
360360
}
361361
}

0 commit comments

Comments
 (0)