Skip to content

Commit

Permalink
types: add PATCH method, same as pull request #1778
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jun 4, 2018
1 parent 21ce024 commit 50abd84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ declare const assert: Chai.AssertStatic
declare namespace Cypress {
type FileContents = string | any[] | object
type HistoryDirection = "back" | "forward"
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "HEAD" | "TRACE" | "CONNECT"
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "HEAD" | "TRACE" | "CONNECT" | "PATCH"
type RequestBody = string | object
type ViewportOrientation = "portrait" | "landscape"
type PrevSubject = "optional" | "element" | "document" | "window"
Expand Down
4 changes: 4 additions & 0 deletions cli/types/tests/kitchen-sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,10 @@ describe('Kitchen Sink', function() {
expect(response).to.have.property('headers')
expect(response).to.have.property('duration')
})

// accepts method, including "PATCH"
cy.request('POST', 'http://somewhere.com', {foo: 'bar'})
cy.request('PATCH', 'http://somewhere.com', {foo: 'bar'})
})

it('cy.route() - route responses to matching requests', function() {
Expand Down

0 comments on commit 50abd84

Please sign in to comment.