Skip to content

Commit

Permalink
chore: add vue-dompurify-html plugin to Cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
fterra-encora committed Oct 30, 2024
1 parent 9c1eb3f commit 94be2ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import './commands'

import { mount } from 'cypress/vue'
import '@cypress/code-coverage/support'
import VueDOMPurifyHTML from "vue-dompurify-html";
import '@/styles'

declare global {
Expand All @@ -15,4 +16,10 @@ declare global {
}
}

Cypress.Commands.add('mount', mount)
Cypress.Commands.add('mount', (component, options = {}) => {
options.global = options.global || {};
options.global.plugins = options.global.plugins || [];
options.global.plugins.push(VueDOMPurifyHTML);

return mount(component, options);
});

0 comments on commit 94be2ad

Please sign in to comment.