Skip to content

Commit 688802c

Browse files
committed
Fix a few references.
1 parent 1ae4fd6 commit 688802c

File tree

15 files changed

+25
-26
lines changed

15 files changed

+25
-26
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ However, one does not need to have any prior experience with these concepts. The
217217
[dependency-management-article]: <doc:DependencyManagement>
218218
[sharing-state-article]: <doc:SharingState>
219219
[navigation-article]: <doc:Navigation>
220-
[testing-article]: <doc:Testing>
220+
[testing-article]: <doc:TestingTCA>
221221
[migration-1.7-article]: <doc:MigratingTo1.7>
222222
[migration-1.10-article]: <doc:MigratingTo1.10>
223223
[sync-ups-tutorial]: <doc:BuildingSyncUps>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ doing much additional work.
252252

253253
## Testing your feature
254254

255-
> Note: For more in-depth information on testing, see the dedicated <doc:Testing>
255+
> Note: For more in-depth information on testing, see the dedicated <doc:TestingTCA>
256256
article.
257257

258258
To test use a `TestStore`, which can be created with the same information as the `Store`, but it
@@ -464,7 +464,7 @@ let store = TestStore(initialState: Feature.State()) {
464464

465465
That is the basics of building and testing a feature in the Composable Architecture. There are
466466
_a lot_ more things to be explored. Be sure to check out the <doc:MeetComposableArchitecture>
467-
tutorial, as well as dedicated articles on <doc:DependencyManagement>, <doc:Testing>,
467+
tutorial, as well as dedicated articles on <doc:DependencyManagement>, <doc:TestingTCA>,
468468
<doc:Navigation>, <doc:Performance>, and more. Also, the [Examples][examples] directory has
469469
a bunch of projects to explore to see more advanced usages.
470470

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ Shared state behaves quite a bit different from the regular state held in Compos
452452
features. It is capable of being changed by any part of the application, not just when an action is
453453
sent to the store, and it has reference semantics rather than value semantics. Typically references
454454
cause serious problems with testing, especially exhaustive testing that the library prefers (see
455-
<doc:Testing>), because references cannot be copied and so one cannot inspect the changes
455+
<doc:TestingTCA>), because references cannot be copied and so one cannot inspect the changes
456456
before and after an action is sent.
457457

458458
For this reason, the `@Shared` property wrapper does extra work during testing to preserve a
@@ -658,11 +658,11 @@ func basics() {
658658
However, if your test suite is a part of an app target, then the entry point of the app will execute
659659
and potentially cause an early access of `@Shared`, thus capturing a different default value than
660660
what is specified above. This quirk of tests in app targets is documented in
661-
<doc:Testing#Testing-gotchas> of the <doc:Testing> article, and a similar quirk
661+
<doc:TestingTCA#Testing-gotchas> of the <doc:TestingTCA> article, and a similar quirk
662662
exists for Xcode previews and is discussed below in <doc:SharingState#Gotchas-of-Shared>.
663663

664664
The most robust workaround to this issue is to simply not execute your app's entry point when tests
665-
are running, which we detail in <doc:Testing#Testing-host-application>. This makes it so that you
665+
are running, which we detail in <doc:TestingTCA#Testing-host-application>. This makes it so that you
666666
are not accidentally execute network requests, tracking analytics, etc. while running tests.
667667

668668
You can also work around this issue by simply setting the shared state again after initializing
@@ -1071,7 +1071,7 @@ you cannot override shared state in previews.
10711071

10721072
The fix is to delay creation of the store until the entry point's `body` is executed. Further, it
10731073
can be a good idea to also not run the `body` when in tests because that can also interfere with
1074-
tests (as documented in <doc:Testing#Testing-gotchas>). Here is one way this can be accomplished:
1074+
tests (as documented in <doc:TestingTCA#Testing-gotchas>). Here is one way this can be accomplished:
10751075

10761076
```swift
10771077
import ComposableArchitecture

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ with the parent.
350350
## Testing
351351
352352
A huge benefit of using the tools of this library to model navigation stacks is that testing becomes
353-
quite easy. Further, using "non-exhaustive testing" (see <doc:Testing#Non-exhaustive-testing>) can
353+
quite easy. Further, using "non-exhaustive testing" (see <doc:TestingTCA#Non-exhaustive-testing>) can
354354
be very useful for testing navigation since you often only want to assert on a few high level
355355
details and not all state mutations and effects.
356356
@@ -537,11 +537,11 @@ other in a navigation stack.
537537
However, the more complex the features become, the more cumbersome testing their integration can be.
538538
By default, ``TestStore`` requires us to be exhaustive in our assertions. We must assert on how
539539
every piece of state changes, how every effect feeds data back into the system, and we must make
540-
sure that all effects finish by the end of the test (see <doc:Testing> for more info).
540+
sure that all effects finish by the end of the test (see <doc:TestingTCA> for more info).
541541

542542
But ``TestStore`` also supports a form of testing known as "non-exhaustive testing" that allows you
543543
to assert on only the parts of the features that you actually care about (see
544-
<doc:Testing#Non-exhaustive-testing> for more info).
544+
<doc:TestingTCA#Non-exhaustive-testing> for more info).
545545

546546
For example, if we turn off exhaustivity on the test store (see ``TestStore/exhaustivity``) then we
547547
can assert at a high level that when the increment button is tapped twice that eventually we receive

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ the child domain without explicitly communicating with the parent.
512512
## Testing
513513
514514
A huge benefit of properly modeling your domains for navigation is that testing becomes quite easy.
515-
Further, using "non-exhaustive testing" (see <doc:Testing#Non-exhaustive-testing>) can be very
515+
Further, using "non-exhaustive testing" (see <doc:TestingTCA#Non-exhaustive-testing>) can be very
516516
useful for testing navigation since you often only want to assert on a few high level details and
517517
not all state mutations and effects.
518518
@@ -626,11 +626,11 @@ other.
626626
However, the more complex the features become, the more cumbersome testing their integration can be.
627627
By default, ``TestStore`` requires us to be exhaustive in our assertions. We must assert on how
628628
every piece of state changes, how every effect feeds data back into the system, and we must make
629-
sure that all effects finish by the end of the test (see <doc:Testing> for more info).
629+
sure that all effects finish by the end of the test (see <doc:TestingTCA> for more info).
630630

631631
But ``TestStore`` also supports a form of testing known as "non-exhaustive testing" that allows you
632632
to assert on only the parts of the features that you actually care about (see
633-
<doc:Testing#Non-exhaustive-testing> for more info).
633+
<doc:TestingTCA#Non-exhaustive-testing> for more info).
634634

635635
For example, if we turn off exhaustivity on the test store (see ``TestStore/exhaustivity``) then we
636636
can assert at a high level that when the increment button is tapped twice that eventually we receive

Sources/ComposableArchitecture/Documentation.docc/ComposableArchitecture.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ day-to-day when building applications, such as:
4949

5050
- <doc:GettingStarted>
5151
- <doc:DependencyManagement>
52-
- <doc:Testing>
52+
- <doc:TestingTCA>
5353
- <doc:Navigation>
5454
- <doc:SharingState>
5555
- <doc:Performance>
@@ -70,7 +70,7 @@ day-to-day when building applications, such as:
7070
### Testing
7171

7272
- ``TestStore``
73-
- <doc:Testing>
73+
- <doc:TestingTCA>
7474

7575
### Integrations
7676

Sources/ComposableArchitecture/Documentation.docc/Extensions/Deprecations/StoreDeprecations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ instead.
1515

1616
### UIKit integration
1717

18-
- ``ifLet(then:else:)``
18+
- ``Store/ifLet(then:else:)``

Sources/ComposableArchitecture/Documentation.docc/Extensions/Effect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- ``cancellable(id:cancelInFlight:)``
1616
- ``cancel(id:)``
17-
- ``withTaskCancellation(id:cancelInFlight:operation:)``
17+
- ``ComposableArchitecture/withTaskCancellation(id:cancelInFlight:isolation:operation:)``
1818
- ``_Concurrency/Task/cancel(id:)``
1919

2020
### Composition

Sources/ComposableArchitecture/Documentation.docc/Extensions/Reducer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct CounterFeature: Reducer {
135135
> Note: This sample emulates a timer by performing an infinite loop with a `Task.sleep` inside. This
136136
> is simple to do, but is also inaccurate since small imprecisions can accumulate. It would be
137137
> better to inject a clock into the feature so that you could use its `timer` method. Read the
138-
> <doc:DependencyManagement> and <doc:Testing> articles for more information.
138+
> <doc:DependencyManagement> and <doc:TestingTCA> articles for more information.
139139
140140
That is the basics of implementing a feature as a conformance to ``Reducer``.
141141

Sources/ComposableArchitecture/Documentation.docc/Extensions/StoreState.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@
66

77
- ``Store/state-20w4g``
88
- ``Store/state-2wgiw``
9-
- ``Store/state-1qxwl``

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/03-SyncUpForm/TestingSyncUpForm.tutorial

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
}
102102

103103
There are two ways one can fix this test. You can use the library's "non-exhaustive" testing
104-
tools (see <doc:Testing#Non-exhaustive-testing> for more info), which allows you to assert
104+
tools (see <doc:TestingTCA#Non-exhaustive-testing> for more info), which allows you to assert
105105
on only the bits of state you care about. That can be handy, but we don't feel it is
106106
appropriate in such a simple feature like `SyncUpForm`. We think non-exhaustive testing is
107107
best saved for testing the integration of features, and that exhaustive testing is best for

Sources/ComposableArchitecture/Documentation.docc/Tutorials/BuildingSyncUps/04-PresentingSyncUpForm/TestingSyncUpFormPresentation.tutorial

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
This means in non-exhaustive test stores you do not have make any mutations in the trailing
212212
closure if you do not want to. And anything you _do_ set in the trailing closure must match
213213
what was already there in order for the test to pass. See the dedicated article
214-
<doc:Testing#Non-exhaustive-testing> for more information.
214+
<doc:TestingTCA#Non-exhaustive-testing> for more information.
215215

216216
@Step {
217217
Emulate the user making edits to the sync-up, but again do not provide a trailing closure.

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-TestingPresentation.tutorial

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
as the reducer that is being tested.
2626

2727
> Note: See <doc:01-03-TestingYourFeature> for a tutorial on testing, as well as the article
28-
<doc:Testing> for more detailed information.
28+
<doc:TestingTCA> for more detailed information.
2929

3030
@Code(name: "ContactsFeatureTests.swift", file: 02-03-01-code-0001.swift)
3131
}
@@ -183,7 +183,7 @@
183183
manner, especially when testing the integration of many features, such as is the case with
184184
features performing navigation.
185185

186-
See <doc:Testing#Non-exhaustive-testing> for more information on non-exhaustive testing
186+
See <doc:TestingTCA#Non-exhaustive-testing> for more information on non-exhaustive testing
187187
techniques.
188188
}
189189

Sources/ComposableArchitecture/TestStore.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import IssueReporting
1414
/// of the way you must assert exactly how state changed, and how effect emissions were fed back
1515
/// into the system.
1616
///
17-
/// See the dedicated <doc:Testing> article for detailed information on testing.
17+
/// See the dedicated <doc:TestingTCA> article for detailed information on testing.
1818
///
1919
/// ## Exhaustive testing
2020
///
@@ -512,7 +512,7 @@ public final class TestStore<State, Action> {
512512

513513
/// Creates a test store with an initial state and a reducer powering its runtime.
514514
///
515-
/// See <doc:Testing> and the documentation of ``TestStore`` for more information on how to best
515+
/// See <doc:TestingTCA> and the documentation of ``TestStore`` for more information on how to best
516516
/// use a test store.
517517
///
518518
/// - Parameters:
@@ -1044,7 +1044,7 @@ extension TestStore where State: Equatable {
10441044
/// to differ from the current state of the test store, a test failure will be triggered.
10451045
///
10461046
/// This tool is most useful in non-exhaustive test stores (see
1047-
/// <doc:Testing#Non-exhaustive-testing>), which allow you to assert on a subset of the things
1047+
/// <doc:TestingTCA#Non-exhaustive-testing>), which allow you to assert on a subset of the things
10481048
/// happening inside your features. For example, you can send an action in a child feature
10491049
/// without asserting on how many changes in the system, and then tell the test store to
10501050
/// ``finish(timeout:fileID:file:line:column:)-klnc`` by executing all of its effects, and finally

0 commit comments

Comments
 (0)