DigitalConsumer.ISS/src/iss-components/site-header/site-header.spec.js
Johan Gunawan 8ab9838425 SSR-199
2023-01-20 15:30:32 -05:00

25 lines
630 B
JavaScript

import siteHeader from "@/iss-components/site-header/site-header";
import { shallowMount } from "@vue/test-utils";
import { getMountOptions } from "@/helpers/unit-test-helper.js";
describe("site-header", () => {
test("renders the logo image", () => {
const wrapper = setupMocks({mountOptionsMockData: {}});
expect(wrapper.find("img")).toBeTruthy();
wrapper.unmount();
});
});
function setupMocks({
mountOptionsMockData = {},
}) {
const mountOptions = getMountOptions(mountOptionsMockData);
const wrapper = shallowMount(siteHeader, mountOptions);
return wrapper;
}