Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09ac2a2

Browse filesBrowse files
sam-githubItalo A. Casas
authored andcommitted
doc: specify sorted requires in tests
And allow anchor links to the various sections, to more easily reference them when reviewing PRs. PR-URL: #10716 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent da57213 commit 09ac2a2
Copy full SHA for 09ac2a2

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎doc/guides/writing-tests.md‎

Copy file name to clipboardExpand all lines: doc/guides/writing-tests.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Let's analyze this basic test from the Node.js test suite:
2929
4 // This test ensures that the http-parser can handle UTF-8 characters
3030
5 // in the http header.
3131
6
32-
7 const http = require('http');
33-
8 const assert = require('assert');
32+
7 const assert = require('assert');
33+
8 const http = require('http');
3434
9
3535
10 const server = http.createServer(common.mustCall((req, res) => {
3636
11 res.end('ok');
@@ -46,7 +46,7 @@ Let's analyze this basic test from the Node.js test suite:
4646
21 });
4747
```
4848

49-
**Lines 1-2**
49+
### **Lines 1-2**
5050

5151
```javascript
5252
'use strict';
@@ -70,7 +70,7 @@ assigning it to an identifier:
7070
require('../common');
7171
```
7272

73-
**Lines 4-5**
73+
### **Lines 4-5**
7474

7575
```javascript
7676
// This test ensures that the http-parser can handle UTF-8 characters
@@ -80,11 +80,11 @@ require('../common');
8080
A test should start with a comment containing a brief description of what it is
8181
designed to test.
8282

83-
**Lines 7-8**
83+
### **Lines 7-8**
8484

8585
```javascript
86-
const http = require('http');
8786
const assert = require('assert');
87+
const http = require('http');
8888
```
8989

9090
The test checks functionality in the `http` module.
@@ -95,7 +95,7 @@ The require statements are sorted in
9595
[ASCII](http://man7.org/linux/man-pages/man7/ascii.7.html) order (digits, upper
9696
case, `_`, lower case).
9797

98-
**Lines 10-21**
98+
### **Lines 10-21**
9999

100100
This is the body of the test. This test is simple, it just tests that an
101101
HTTP server accepts `non-ASCII` characters in the headers of an incoming

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.