Skip to content

Commit

Permalink
fix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Sep 24, 2024
1 parent b3197b5 commit 246a0b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/driver/cypress/e2e/commands/net_stubbing.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1640,15 +1640,15 @@ describe('network stubbing', { retries: 15 }, function () {
it('can add a body to a request that does not have one', { retries: 15 }, function (done) {
const body = '{"foo":"bar"}'

cy.intercept('/post-only', function (req) {
cy.intercept('/post-only*', function (req) {
expect(req.body).to.eq('')
expect(req.method).to.eq('GET')
req.method = 'POST'
req.headers['content-type'] = 'application/json'

req.body = body
}).then(function () {
$.get('/post-only').done((responseText) => {
$.get('/post-only').then((responseText) => {
expect(responseText).to.contain(body)
done()
})
Expand Down

0 comments on commit 246a0b3

Please sign in to comment.