Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,10 @@ it('loads an instrumented app', () => {
})
```

### `window.__coverage__` exists but the report is empty

If DevTools shows `window.__coverage__` on your page but `.nyc_output/out.json` is empty, your app probably creates the coverage object after the page's `load` event. That happens when the only instrumented files load later, for example route components that Nuxt or Vue Router import lazily, or code that runs during hydration. Versions before 4.1.2 read the coverage object only on `load` and at the start of each test, so they missed it. Upgrade to 4.1.2 or later, which reads each page again before it unloads and at the end of each test. If you're on 3.x, follow the [3.x to 4.x migration](#cypresscode-coverage-3x-to-4x) first. See [#843](https://github.com/cypress-io/code-coverage/issues/843).

### Coverage reporting timeouts

If the plugin times out when sending coverage report data to be merged, this may be due to a very large
Expand Down
Loading