Skip to content
Merged
Changes from 3 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
8 changes: 8 additions & 0 deletions support.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ const registerHooks = () => {
windowCoverageObjects = []

const saveCoverageObject = (win) => {
// accessing win.__coverage__ will error when testing cross-origin code
// because we don't control cross-origin code anyway, we can safely return
try {
win.__coverage__
} catch {
return
}

// if application code has been instrumented, the app iframe "window" has an object
const applicationSourceCoverage = win.__coverage__
if (!applicationSourceCoverage) {
Expand Down