Skip to content

Commit

Permalink
fix: head content reset, fix cypress-io#19721
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed May 2, 2022
1 parent a47b45f commit 3b16afd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions npm/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ type CyMountOptions<Props, Data = {}> = Omit<MountingOptions<Props, Data>, 'atta
}
} & Partial<StyleOptions>

let initialInnerHtml = ''

Cypress.on('run:start', () => {
// `mount` is designed to work with component testing only.
// it assumes ROOT_ID exists, which is not the case in e2e.
Expand All @@ -52,7 +50,6 @@ Cypress.on('run:start', () => {
return
}

initialInnerHtml = document.head.innerHTML
Cypress.on('test:before:run', () => {
Cypress.vueWrapper?.unmount()
// @ts-ignore
Expand All @@ -64,7 +61,6 @@ Cypress.on('run:start', () => {
}

el.innerHTML = ''
document.head.innerHTML = initialInnerHtml
})
})

Expand Down

0 comments on commit 3b16afd

Please sign in to comment.