Skip to content

Commit ac28eba

Browse files
committed
wip
1 parent d46c2b9 commit ac28eba

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Sources/ComposableArchitecture/Documentation.docc/Articles/DependencyManagement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ any reducer.
88
Dependencies in an application are the types and functions that need to interact with outside
99
systems that you do not control. Classic examples of this are API clients that make network requests
1010
to servers, but also seemingly innocuous things such as `UUID` and `Date` initializers, and even
11-
schedulers and clocks, can be thought of as dependencies.
11+
clocks, can be thought of as dependencies.
1212

1313
By controlling the dependencies our features need to do their job we gain the ability to completely
1414
alter the execution context a feature runs in. This means in tests and Xcode previews you can

Sources/ComposableArchitecture/Documentation.docc/Articles/Testing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ going to be received, but after waiting around for a small amount of time no act
273273
This is because our timer is on a 1 second interval, and by default
274274
``TestStore/receive(_:timeout:_:file:line:)`` only waits for a fraction of a second. This is
275275
because typically you should not be performing real time-based asynchrony in effects, and instead
276-
using a controlled entity, such as a scheduler or clock, that can be sped up in tests. We will
277-
demonstrate this in a moment, so for now let's increase the timeout:
276+
using a controlled entity, such as a clock, that can be sped up in tests. We will demonstrate this
277+
in a moment, so for now let's increase the timeout:
278278

279279
```swift
280280
await store.receive(.timerTick, timeout: .seconds(2)) {
@@ -403,7 +403,6 @@ dependencies, read the <doc:DependencyManagement> article.
403403
[Testing-effects]: #Testing-effects
404404
[Designing-dependencies]: #Designing-dependencies
405405
[Unimplemented-dependencies]: #Unimplemented-dependencies
406-
[gh-combine-schedulers]: http://github.com/pointfreeco/combine-schedulers
407406
[gh-xctest-dynamic-overlay]: http://github.com/pointfreeco/xctest-dynamic-overlay
408407
[tca-examples]: https://github.com/pointfreeco/swift-composable-architecture/tree/main/Examples
409408
[gh-swift-clocks]: http://github.com/pointfreeco/swift-clocks

Sources/ComposableArchitecture/ReducerProtocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797
///
9898
/// > Note: This sample emulates a timer by performing an infinite loop with a `Task.sleep`
9999
/// inside. This is simple to do, but is also inaccurate since small imprecisions can accumulate.
100-
/// It would be better to inject a Combine scheduler into the feature and use its async-friendly
101-
/// `timer` method. Read the <doc:DependencyManagement> and <doc:Testing> articles for more
100+
/// It would be better to inject a clock into the feature so that you could use its `timer`
101+
/// method. Read the <doc:DependencyManagement> and <doc:Testing> articles for more
102102
/// information.
103103
///
104104
/// That is the basics of implementing a feature as a conformance to ``ReducerProtocol``. There are

0 commit comments

Comments
 (0)