You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you run Cypress tests in a Docker container? yes in CI, MacOS locally
Describe the bug
The logic to determine if cypress is running an "end-to-end" test incorrectly resolves as true in my cypress tests, as our baseUrl and proxyUrl are different.
From the above code, runningEndToEndTests evaluates to true if your baseUrl and proxyUrl are different, which they are in my case but I am not running end-to-end tests.
As my specType is integration, after tests complete an attempt is made to reach a /coverage URL which does not exist, thus failing the test.
I would like to propose perhaps setting & checking against a new config codeCoverage.expectFrontendCoverageOnly explicitly to determine if backend coverage needs to be collected (similar to the pre-existing expectBackendCoverageOnly config), eg. the above code reference could be augmented to preserve the existing behavior but allowing an explicit check against expectFrontendCoverageOnly
Link to the repo
The code I am using @cypress/code-coverage is behind a private GH instance so I unfortunately can't share here. I have created #474 with the above suggestion
The text was updated successfully, but these errors were encountered:
Logs and screenshots
Versions
babel-plugin-istanbul
window.__coverage__
object? yes,window.__coverage__
exists and instrumentation works.nyc_output
folder? yes coverage data is generatedpackage.json
Describe the bug
The logic to determine if cypress is running an "end-to-end" test incorrectly resolves as
true
in my cypress tests, as ourbaseUrl
andproxyUrl
are different.Code reference in question:
code-coverage/support.js
Lines 168 to 172 in c51751f
From the above code,
runningEndToEndTests
evaluates to true if yourbaseUrl
andproxyUrl
are different, which they are in my case but I am not running end-to-end tests.As my
specType
is integration, after tests complete an attempt is made to reach a/coverage
URL which does not exist, thus failing the test.I would like to propose perhaps setting & checking against a new config
codeCoverage.expectFrontendCoverageOnly
explicitly to determine if backend coverage needs to be collected (similar to the pre-existingexpectBackendCoverageOnly
config), eg. the above code reference could be augmented to preserve the existing behavior but allowing an explicit check againstexpectFrontendCoverageOnly
Link to the repo
The code I am using @cypress/code-coverage is behind a private GH instance so I unfortunately can't share here. I have created #474 with the above suggestion
The text was updated successfully, but these errors were encountered: