File tree 1 file changed +40
-7
lines changed 1 file changed +40
-7
lines changed Original file line number Diff line number Diff line change 2
2
require ( '../common' ) ;
3
3
const assert = require ( 'assert' ) ;
4
4
const http = require ( 'http' ) ;
5
- const util = require ( 'util' ) ;
6
5
7
- assert ( Array . isArray ( http . METHODS ) ) ;
8
- assert ( http . METHODS . length > 0 ) ;
9
- assert ( http . METHODS . includes ( 'GET' ) ) ;
10
- assert ( http . METHODS . includes ( 'HEAD' ) ) ;
11
- assert ( http . METHODS . includes ( 'POST' ) ) ;
12
- assert . deepStrictEqual ( util . _extend ( [ ] , http . METHODS ) , http . METHODS . sort ( ) ) ;
6
+ // This test ensures all http methods from HTTP parser are exposed
7
+ // to http library
8
+
9
+ const methods = [
10
+ 'DELETE' ,
11
+ 'GET' ,
12
+ 'HEAD' ,
13
+ 'POST' ,
14
+ 'PUT' ,
15
+ 'CONNECT' ,
16
+ 'OPTIONS' ,
17
+ 'TRACE' ,
18
+ 'COPY' ,
19
+ 'LOCK' ,
20
+ 'MKCOL' ,
21
+ 'MOVE' ,
22
+ 'PROPFIND' ,
23
+ 'PROPPATCH' ,
24
+ 'SEARCH' ,
25
+ 'UNLOCK' ,
26
+ 'BIND' ,
27
+ 'REBIND' ,
28
+ 'UNBIND' ,
29
+ 'ACL' ,
30
+ 'REPORT' ,
31
+ 'MKACTIVITY' ,
32
+ 'CHECKOUT' ,
33
+ 'MERGE' ,
34
+ 'M-SEARCH' ,
35
+ 'NOTIFY' ,
36
+ 'SUBSCRIBE' ,
37
+ 'UNSUBSCRIBE' ,
38
+ 'PATCH' ,
39
+ 'PURGE' ,
40
+ 'MKCALENDAR' ,
41
+ 'LINK' ,
42
+ 'UNLINK'
43
+ ] ;
44
+
45
+ assert . deepStrictEqual ( http . METHODS , methods . sort ( ) ) ;
You can’t perform that action at this time.
0 commit comments