summaryrefslogtreecommitdiff
path: root/spec/frontend/notebook/cells/output/html_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/notebook/cells/output/html_spec.js')
-rw-r--r--spec/frontend/notebook/cells/output/html_spec.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/spec/frontend/notebook/cells/output/html_spec.js b/spec/frontend/notebook/cells/output/html_spec.js
index 48d62d74a50..b94ce7c684d 100644
--- a/spec/frontend/notebook/cells/output/html_spec.js
+++ b/spec/frontend/notebook/cells/output/html_spec.js
@@ -1,26 +1,21 @@
-import Vue from 'vue';
-import htmlOutput from '~/notebook/cells/output/html.vue';
+import { mount } from '@vue/test-utils';
+import HtmlOutput from '~/notebook/cells/output/html.vue';
import sanitizeTests from './html_sanitize_fixtures';
describe('html output cell', () => {
function createComponent(rawCode) {
- const Component = Vue.extend(htmlOutput);
-
- return new Component({
+ return mount(HtmlOutput, {
propsData: {
rawCode,
count: 0,
index: 0,
},
- }).$mount();
+ });
}
it.each(sanitizeTests)('sanitizes output for: %p', (name, { input, output }) => {
const vm = createComponent(input);
- const outputEl = [...vm.$el.querySelectorAll('div')].pop();
-
- expect(outputEl.innerHTML).toEqual(output);
- vm.$destroy();
+ expect(vm.html()).toContain(output);
});
});