@@ -30,8 +30,8 @@ Let's analyze this very basic test from the Node.js test suite:
30
30
4 // This test ensures that the http-parser can handle UTF-8 characters
31
31
5 // in the http header.
32
32
6
33
- 7 const http = require (' http ' );
34
- 8 const assert = require (' assert ' );
33
+ 7 const assert = require (' assert ' );
34
+ 8 const http = require (' http ' );
35
35
9
36
36
10 const server = http .createServer (common .mustCall ((req , res ) => {
37
37
11 res .end (' ok' );
@@ -47,7 +47,7 @@ Let's analyze this very basic test from the Node.js test suite:
47
47
21 });
48
48
```
49
49
50
- ** Lines 1-2**
50
+ ### ** Lines 1-2**
51
51
52
52
``` javascript
53
53
' use strict' ;
@@ -70,7 +70,7 @@ by `common` are used, it can be included without assigning it to an identifier:
70
70
require (' ../common' );
71
71
```
72
72
73
- ** Lines 4-5**
73
+ ### ** Lines 4-5**
74
74
75
75
``` javascript
76
76
// This test ensures that the http-parser can handle UTF-8 characters
@@ -80,19 +80,19 @@ require('../common');
80
80
A test should start with a comment containing a brief description of what it is
81
81
designed to test.
82
82
83
- ** Lines 7-8**
83
+ ### ** Lines 7-8**
84
84
85
85
``` javascript
86
- const http = require (' http' );
87
86
const assert = require (' assert' );
87
+ const http = require (' http' );
88
88
```
89
89
90
90
These modules are required for the test to run. Except for special cases, these
91
91
modules should only include core modules.
92
92
The ` assert ` module is used by most of the tests to check that the assumptions
93
93
for the test are met.
94
94
95
- ** Lines 10-21**
95
+ ### ** Lines 10-21**
96
96
97
97
This is the body of the test. This test is quite simple, it just tests that an
98
98
HTTP server accepts ` non-ASCII ` characters in the headers of an incoming
0 commit comments