I am trying to use ApolloTestSupport in unit tests. I want to add generated test models to only unit test target. Generated models doesn’t have @testable import MyApp.
so cannot use TestMocks.
apollo-codegen-config.json
output segment looks below.
"output": {
"testMocks": { "absolute": {
"path": "../../Tests/GeneratedAPI/Mocks"
}
},
"schemaTypes": {
"path": "./GeneratedAPI",
"moduleType": { "embeddedInTarget": { "name": "MyApp" } }
},
"operations": {
"inSchemaModule": {}
}
I would like to know how to add test mocks to unit target and keep generated model embedded to source target.