为集成测试禁用 Realm.Sync
Disable Realm.Sync for Integration Tests
我在我的 Realm 上做了一些集成测试,但是当我在我的 CI 上 运行 时,我收到了这个错误消息:Realm.Sync is not available. Note that the developer edition of the Node.JS SDK for Realm does not include sync on Linux.
我明白消息的意思,我的集成测试不需要 Realm Sync。我如何在 CI 环境中禁用 Realm.sync?
从技术上讲,Realm.sync
在您的 CI 上被禁用 -- 因为它在 Linux 上处于 运行 状态。您可以使用某种条件来保护依赖它的代码部分,以确保您 运行 代码不会在您的 CI 机器上访问它。
我在我的 Realm 上做了一些集成测试,但是当我在我的 CI 上 运行 时,我收到了这个错误消息:Realm.Sync is not available. Note that the developer edition of the Node.JS SDK for Realm does not include sync on Linux.
我明白消息的意思,我的集成测试不需要 Realm Sync。我如何在 CI 环境中禁用 Realm.sync?
从技术上讲,Realm.sync
在您的 CI 上被禁用 -- 因为它在 Linux 上处于 运行 状态。您可以使用某种条件来保护依赖它的代码部分,以确保您 运行 代码不会在您的 CI 机器上访问它。