DEV Community

Discussion on: Code Coverage With Cypress & Angular

Collapse
 
craigdae profile image
Craig

Hey, I'm having two issues that I was hoping you could help me work through.

  1. When I run ng e2e using @briebug/cypress-schematic, it sets the baseUrl to http://localhost:4200. Cypress tells me this is being set in the cli. I need the baseUrl to be: http://localhost.localdomain:8080 for reasons relating the nginx being configured a specific way for the local backend. I can't figure out how to override this value. cypress.json doesn't do it, setting an environment variable in linux doesn't do it. How can I set the baseUrl to what I need?

  2. I get the error: ⚠️ Code coverage tasks were not registered by the plugins file. See support issue for possible workarounds. [@cypress/code-coverage] I can't make sense of this error, since I followed the steps in this guide, and I have require('@cypress/code-coverage/task')(on, config); in my index.js file.

Please help!