| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ac1b81a commit 6d9f94f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,11 +23,44 @@ | |||
| 23 | 23 | require('../common'); | |
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | const http = require('http'); | |
| 26 | - const util = require('util'); | ||
| 27 | 26 | ||
| 28 | - assert(Array.isArray(http.METHODS)); | ||
| 29 | - assert(http.METHODS.length > 0); | ||
| 30 | - assert(http.METHODS.includes('GET')); | ||
| 31 | - assert(http.METHODS.includes('HEAD')); | ||
| 32 | - assert(http.METHODS.includes('POST')); | ||
| 33 | - assert.deepStrictEqual(util._extend([], http.METHODS), http.METHODS.sort()); | ||
| 27 | + // This test ensures all http methods from HTTP parser are exposed | ||
| 28 | + // to http library | ||
| 29 | + | ||
| 30 | + const methods = [ | ||
| 31 | + 'DELETE', | ||
| 32 | + 'GET', | ||
| 33 | + 'HEAD', | ||
| 34 | + 'POST', | ||
| 35 | + 'PUT', | ||
| 36 | + 'CONNECT', | ||
| 37 | + 'OPTIONS', | ||
| 38 | + 'TRACE', | ||
| 39 | + 'COPY', | ||
| 40 | + 'LOCK', | ||
| 41 | + 'MKCOL', | ||
| 42 | + 'MOVE', | ||
| 43 | + 'PROPFIND', | ||
| 44 | + 'PROPPATCH', | ||
| 45 | + 'SEARCH', | ||
| 46 | + 'UNLOCK', | ||
| 47 | + 'BIND', | ||
| 48 | + 'REBIND', | ||
| 49 | + 'UNBIND', | ||
| 50 | + 'ACL', | ||
| 51 | + 'REPORT', | ||
| 52 | + 'MKACTIVITY', | ||
| 53 | + 'CHECKOUT', | ||
| 54 | + 'MERGE', | ||
| 55 | + 'M-SEARCH', | ||
| 56 | + 'NOTIFY', | ||
| 57 | + 'SUBSCRIBE', | ||
| 58 | + 'UNSUBSCRIBE', | ||
| 59 | + 'PATCH', | ||
| 60 | + 'PURGE', | ||
| 61 | + 'MKCALENDAR', | ||
| 62 | + 'LINK', | ||
| 63 | + 'UNLINK' | ||
| 64 | + ]; | ||
| 65 | + | ||
| 66 | + assert.deepStrictEqual(http.METHODS, methods.sort()); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments