@@ -39,22 +39,26 @@ they're the greatest. I'm not going to do that.
39
39
40
40
### <i lang =" it " >tutti i gusti, sono gusti</i >
41
41
42
+ Software testing is a software and user experience design challenge
43
+ that balances on the intersection of many conflicting demands.
44
+
42
45
Node-tap is based on [ my] ( http://izs.me ) opinions about how a test
43
46
framework should work, and what it should let you do. I do _ not_ have
44
- any opinion about whether or not you share those opinions.
47
+ any opinion about whether or not you share those opinions. If you do
48
+ share them, you will probably enjoy this test library.
45
49
46
50
1 . ** Test files should be "normal" programs that can be run
47
51
directly.**
48
52
49
53
That means that it can't require a special runner that
50
54
puts magic functions into a global space. ` node test.js ` is a
51
- perfectly reasonable way to run a test, and it ought to function
55
+ perfectly ok way to run a test, and it ought to function
52
56
exactly the same as when it's run by the fancy runner with
53
57
reporting and such. JavaScript tests should be JavaScript
54
58
programs; not english-language poems with weird punctuation.
55
59
56
- 2 . ** Test output should be sensibly connected to the structure of the
57
- test file.**
60
+ 2 . ** Test output should be connected to the structure of the
61
+ test file that is easy to determine .**
58
62
59
63
That means not unnecessarily deferring test functions
60
64
until ` nextTick ` , because that would shift the order of
@@ -86,12 +90,12 @@ any opinion about whether or not you share those opinions.
86
90
5 . ** Test reporting should be separate from the test process, included
87
91
in the framework, and enabled by default for humans.**
88
92
89
- The [ raw test output] ( http://www.node-tap.org/tap-format/ ) should be machine-parseable and
90
- human-intelligible, and a separate process should consume test
91
- output and turn it into a [ pretty summarized
92
- report] ( http://www.node-tap.org/reporting/ ) .
93
- This means that test data can be stored and parsed later, dug into
94
- for additional details, and so on. Also: nyan cat.
93
+ The [ raw test output] ( http://www.node-tap.org/tap-format/ ) should
94
+ be machine-parseable and human-intelligible, and a separate process
95
+ should consume test output and turn it into a [ pretty summarized
96
+ report] ( http://www.node-tap.org/reporting/ ) . This means that test
97
+ data can be stored and parsed later, dug into for additional
98
+ details, and so on. Also: nyan cat.
95
99
96
100
6 . ** Writing tests should be easy, maybe even fun.**
97
101
@@ -104,7 +108,7 @@ any opinion about whether or not you share those opinions.
104
108
105
109
That being said, if the you returns a Promise, or use a DSL that
106
110
throws a decorated error, then the test framework should Just Work
107
- in a way that is reasonable .
111
+ in a way that helps a human being understand the situation .
108
112
109
113
7 . ** Tests should output enough data to diagnose a failure, and no
110
114
more or less.**
@@ -138,8 +142,9 @@ any opinion about whether or not you share those opinions.
138
142
139
143
Babel and Webpack are lovely and fine. But if your code doesn't
140
144
require compilation, then I think your tests shouldn't either.
141
- Tap is extremely [ promise-aware] ( http://www.node-tap.org/promises/ ) , but works on any
142
- version of Node.js back to v0.10.
145
+ Tap is extremely
146
+ [ promise-aware] ( http://www.node-tap.org/promises/ ) , but works on
147
+ any version of Node.js back to v0.10.
143
148
144
149
Software testing should help you build software. It should be a
145
150
security blanket and a quality ratchet, giving you the support to
0 commit comments