TCA 可组合架构 - 没有这样的模块“测试”

问题描述 投票:0回答:1

我正在尝试遵循有关测试的可组合架构教程https://pointfreeco.github.io/swift-composable-architecture/main/tutorials/composablearchitecture/01-03-testingyourfeature/

但我一开始就卡住了

我正在尝试导入测试模块:

import ComposableArchitecture
import Testing

@testable import MyApp

但是我有这个错误:

没有这样的模块“测试”

我错过了什么吗?

swift unit-testing swift-composable-architecture
1个回答
0
投票

因为 Swift 测试是随 XCode 16 一起提供的,所以请尝试将您的 XCode 更新到最新版本:https://developer.apple.com/documentation/testing/

© www.soinside.com 2019 - 2024. All rights reserved.