This commit is contained in:
Kulbhushan Kaushik 2022-10-28 10:41:57 -04:00
parent 026ff5612a
commit fb1006632f

View file

@ -3,14 +3,14 @@ import { shallowMount } from "@vue/test-utils";
describe("site sub header", () => { describe("site sub header", () => {
const subHeaderText = "<p>let's fix your glass</p>"; const subHeaderText = "let's fix your glass";
const mockMixin = { const mockMixin = {
methods: { methods: {
getCmsContent: jest.fn().mockImplementation(()=> { getCmsContent: jest.fn().mockImplementation(()=> {
return subHeaderText; return subHeaderText;
}) })
} }
} };
it("should contain the cms content", () => { it("should contain the cms content", () => {
const wrapper = shallowMount(siteSubHeader, { const wrapper = shallowMount(siteSubHeader, {
@ -18,10 +18,9 @@ describe("site sub header", () => {
}); });
wrapper.getCmsContent = jest.fn(); wrapper.getCmsContent = jest.fn();
const actual = wrapper.find("p"); const actual = wrapper.find("span");
expect(actual.html()).toContain(subHeaderText);
expect(actual.html()).toBe(subHeaderText); });
})
}); });