Skip to content

Commit 4d969f9

Browse files
committed
test commit hook
1 parent c7aef35 commit 4d969f9

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

docs/intro.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ title: Introduction
55

66
## The problem
77

8-
You want to write maintainable tests for your Web UI. As a part of
9-
this goal, you want your tests to avoid including implementation details of
10-
your components and rather focus on making your tests give you the confidence
11-
for which they are intended. As part of this, you want your testbase to be
12-
maintainable in the long run so refactors of your components (changes to
13-
implementation but not functionality) don't break your tests and slow you and
14-
your team down.
8+
You want to write maintainable tests for your Web UI. As a part of this goal,
9+
you want your tests to avoid including implementation details of your components
10+
and rather focus on making your tests give you the confidence for which they are
11+
intended. As part of this, you want your testbase to be maintainable in the long
12+
run so refactors of your components (changes to implementation but not
13+
functionality) don't break your tests and slow you and your team down.
1514

1615
## This solution
1716

1817
The `dom-testing-library` is a very light-weight solution for testing DOM nodes
1918
(whether simulated with [`JSDOM`](https://github.com/jsdom/jsdom) as provided by
20-
default with [Jest][jest] or in the browser). The main utilities it provides involve
21-
querying the DOM for nodes in a way that's similar to how the user finds
19+
default with [Jest][jest] or in the browser). The main utilities it provides
20+
involve querying the DOM for nodes in a way that's similar to how the user finds
2221
elements on the page. In this way, the library helps ensure your tests give you
2322
confidence in your UI code. The `dom-testing-library`'s primary guiding
2423
principle is:
@@ -27,10 +26,10 @@ principle is:
2726
2827
As part of this goal, the utilities this library provides facilitate querying
2928
the DOM in the same way the user would. Finding for elements by their label text
30-
(just like a user would), finding links and buttons from their text
31-
(like a user would), and more. It also exposes a recommended way to find
32-
elements by a `data-testid` as an "escape hatch" for elements where the text
33-
content and label do not make sense or is not practical.
29+
(just like a user would), finding links and buttons from their text (like a user
30+
would), and more. It also exposes a recommended way to find elements by a
31+
`data-testid` as an "escape hatch" for elements where the text content and label
32+
do not make sense or is not practical.
3433

3534
This library encourages your applications to be more accessible and allows you
3635
to get your tests closer to using your components the way a user will, which
@@ -40,7 +39,8 @@ when a real user uses it.
4039
**What this library is not**:
4140

4241
1. A test runner or framework
43-
2. Specific to a testing framework (though we recommend Jest as our
44-
preference, the library works with any framework. See [Using Without Jest](setup.md#using-without-jest))
42+
2. Specific to a testing framework (though we recommend Jest as our preference,
43+
the library works with any framework. See
44+
[Using Without Jest](setup.md#using-without-jest))
4545

46-
[jest]: https://jestjs.io
46+
[jest]: https://jestjs.io

website/package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
"lint-staged": {
2121
"linters": {
2222
"*.js": ["prettier --write", "git add"],
23-
"*.md": ["prettier --write --parser=markdown", "git add"],
23+
"../docs/*.md": [
24+
"prettier --write --parser=markdown --prose-wrap=always",
25+
"git add"
26+
],
27+
"*.md": [
28+
"prettier --write --parser=markdown --prose-wrap=always",
29+
"git add"
30+
],
2431
"*.json": ["prettier --write --parser=json", "git add"]
2532
}
2633
},

0 commit comments

Comments
 (0)