Cypress runs old code instead of running updated code

Hi guys. I have started to create test cases in cypress. I run the cypress from the terminal with npx cypress open command. it keeps running the old code not check the updated code under the integration folder.

3 Likes

Some questions which might help you troubleshoot:

  • Did you save your file? :stuck_out_tongue:
  • Are you running your tests from master or from a specific branch?
  • What is the full command you are running?
2 Likes

Can you share the code? I mean if itโ€™s a personal project and not something youโ€™re doing at work - in which case you probably have an Non-disclosure agreement in place. So if you canโ€™t share specifics a bit more background would be helpful.

Depends on your setup, But if you are running npx cypress open only then iโ€™m guessing you have a separate server running your application. Check if the actual application has been restarted? npx cypress open on its own doesnโ€™t relaunch the application.

Worth checking this out if you use js

2 Likes