commit
This commit is contained in:
parent
026ff5612a
commit
fb1006632f
1 changed files with 5 additions and 6 deletions
|
|
@ -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);
|
});
|
||||||
})
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue