@@ -5,23 +5,20 @@ title: Introduction
5
5
6
6
## The problem
7
7
8
- You want to write maintainable tests for the
9
- [ Web Platform] ( https://proposal-common-min-api.deno.dev/ ) or React Native. As a
10
- part of this goal, you want your tests to avoid including implementation details
11
- of your components and rather focus on making your tests give you the confidence
12
- for which they are intended. As part of this, you want your testbase to be
13
- maintainable in the long run so refactors of your components (changes to
14
- implementation but not functionality) don't break your tests and slow you and
15
- your team down.
8
+ You want to write maintainable tests for [ Web-interoperable
9
+ runtimes] [ min-web-api ] . As a part of this goal, you want your tests to avoid
10
+ including implementation details of your components and rather focus on making
11
+ your tests give you the confidence for which they are intended. As part of this,
12
+ you want your testbase to be maintainable in the long run so refactors of your
13
+ components (changes to implementation but not functionality) don't break your
14
+ tests and slow you and your team down.
16
15
17
16
## This solution
18
17
19
18
The ` Web Testing Library ` is a very light-weight solution for testing code that
20
- runs on the Web Platform (a browser, [ Node.js] [ node ] , [ Deno] ( https://deno.land/ )
21
- etc) or React Native. The main utilities it provides involve querying the DOM
22
- for nodes in a way that's similar to how the user finds elements on the page. In
23
- this way, the library helps ensure your tests give you confidence in your UI
24
- code. The ` DOM Testing Library ` 's primary guiding principle is:
19
+ runs on Web-interoperable runtimes (a browser, [ Node.js] [ node ] , [ Deno] [ deno ]
20
+ etc.) or [ React Native] [ react-native ] . The ` Web Testing Library ` 's primary
21
+ guiding principle is:
25
22
26
23
> The more your tests resemble the way your software is used, the more
27
24
> confidence they can give you.
@@ -32,7 +29,7 @@ that closely resemble how your code is used on the Web Platform or React Native.
32
29
Utilities are included in this project based on the following guiding
33
30
principles:
34
31
35
- 1 . They should be usable on both the Web Platform ** and ** React Native
32
+ 1 . They should be usable on the [ minimum common web platform API ] [ min-web-api ]
36
33
2 . It should be generally useful for testing the application in the way the user
37
34
would use it. We _ are_ making some trade-offs here because we're using a
38
35
computer and often a simulated environment, but in general, utilities should
@@ -47,3 +44,6 @@ principles:
47
44
48
45
[ jest ] : https://jestjs.io
49
46
[ node ] : https://nodejs.org/en/
47
+ [ deno ] : https://deno.land/
48
+ [ react-native ] : https://reactnative.dev/
49
+ [ min-web-api ] : https://proposal-common-min-api.deno.dev/
0 commit comments