How to replicate force404 when using cy.intercept #15436
              
                Unanswered
              
          
                  
                    
                      John-Ender
                    
                  
                
                  asked this question in
                Component Testing
              
            Replies: 1 comment
-
| Would something like this https://glebbahmutov.com/blog/cypress-intercept-problems/#force404 work? | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
We want to force all non-mocked API calls to return 404 for our tests. With the
cy.serverandcy.routethis was simple. After upgrading to Cypress 6.0 and migrating all of ourcy.routecalls tocy.interceptthere doesn't seem to be any documentation on how to achieve the same effect.How can I replicate the global 404 response for non mocked calls?
Beta Was this translation helpful? Give feedback.
All reactions