Skip to content

Commit

Permalink
fix: add QUERY to httpMethods which was added in Node 22.2.0 (#380)
Browse files Browse the repository at this point in the history
* fix: add QUERY httpMethods which is new in v22

* test: update pretty-print.test.js

Add QUERY to list of methods in test
  • Loading branch information
andokai authored Sep 28, 2024
1 parent 6a98d20 commit c38bd87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/http-methods.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict'

// defined by Node.js http module, a snapshot from Node.js 18.12.0
// defined by Node.js http module, a snapshot from Node.js 22.9.0
const httpMethods = [
'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE',
'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE',
'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS',
'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT',
'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'QUERY',
'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE',
'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE'
]
Expand Down
4 changes: 2 additions & 2 deletions test/pretty-print.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ test('pretty print - print all methods', t => {
└── /
└── test (ACL, BIND, CHECKOUT, CONNECT, COPY, DELETE, GET, HEAD, LINK, LOCK, \
M-SEARCH, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MOVE, NOTIFY, OPTIONS, PATCH, \
POST, PROPFIND, PROPPATCH, PURGE, PUT, REBIND, REPORT, SEARCH, SOURCE, SUBSCRIBE, \
TRACE, UNBIND, UNLINK, UNLOCK, UNSUBSCRIBE)
POST, PROPFIND, PROPPATCH, PURGE, PUT, QUERY, REBIND, REPORT, SEARCH, SOURCE, \
SUBSCRIBE, TRACE, UNBIND, UNLINK, UNLOCK, UNSUBSCRIBE)
`
t.equal(typeof tree, 'string')
t.equal(tree, expected)
Expand Down

0 comments on commit c38bd87

Please sign in to comment.