1
1
# Fixture content
2
2
3
3
Fixture content is content (and data) that is meant to look very similar
4
- to the real content, but exists for the benefit of testing functionality.
4
+ to the real content but exists for the benefit of testing functionality.
5
5
6
- In its simplest form, code and content is intricately linked, and oftentimes
6
+ In its simplest form, code and content are intricately linked, and oftentimes
7
7
to be able to have automated testing of functionality, you need some content
8
8
to exercise that functionality.
9
9
@@ -13,24 +13,24 @@ sustainably works when we're changing any code, but without having to
13
13
worry about the real English content breaking the tests.
14
14
15
15
** Note!** We also don't want the writers of the real English content to
16
- have to worry about breaking tests of functionality.
16
+ have to worry about breaking functionality tests .
17
17
18
18
## How to write fixtured based rendering tests
19
19
20
20
The content is in ` src/fixtures/fixtures/content/ ` (and ` src/fixtures/fixtures/data/ ` )
21
- is a cut down version of the real ` content/ ` (and ` data/ ` ) at the root.
22
- It doesn't have nearly as many pages and if you look closely you'll see
21
+ is a cut- down version of the real ` content/ ` (and ` data/ ` ) at the root.
22
+ It doesn't have nearly as many pages, and if you look closely, you'll see
23
23
references and mentions to unrealistic things like "foo" or "HubGit"
24
- which are whimsical but also importantly * different* . If it works
25
- with any silly name, the code is modular and good .
24
+ which are whimsical but more importantly * different* . The code is modular and good if it works
25
+ with any silly name.
26
26
27
27
### Quickstart
28
28
29
29
Navigate around in ` src/fixtures/fixtures/content/ ` and familiarize yourself
30
30
with the directory structure. The only things that are "identical" to the
31
- real content is the top-level product names which match the real content.
31
+ actual content are the top-level product names, which match the actual content.
32
32
Deeper than the product level, the names and directories can be whatever
33
- you want it to be.
33
+ you want them to be.
34
34
35
35
Once you've found a place to put some fixture content, before writing
36
36
a ` vitest ` test, you can preview your changes using:
0 commit comments