storj/web/satellite/tests/unit/common/VHeader.spec.ts
Vitalii c5bca894fd web/satellite: fix linter
Added imports linting, trailing commas, trailing semicolons, single quotes and spaces between curly braces.

Change-Id: I5de5d3eea48753dfe2737983b230bafaffe898c8
2022-09-09 11:02:04 +00:00

32 lines
924 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import { mount, shallowMount } from '@vue/test-utils';
import HeaderComponent from '@/components/common/VHeader.vue';
describe('HeaderComponent.vue', () => {
it('renders correctly', () => {
const wrapper = shallowMount<HeaderComponent>(HeaderComponent);
expect(wrapper).toMatchSnapshot();
});
it('renders correctly with default props', () => {
const wrapper = mount<HeaderComponent>(HeaderComponent);
expect(wrapper.vm.$props.placeholder).toMatch('');
});
it('function clearSearch works correctly', () => {
const search = jest.fn();
const wrapper = mount<HeaderComponent>(HeaderComponent, {
propsData: {
search: search,
},
});
wrapper.vm.clearSearch();
expect(search).toHaveBeenCalledTimes(1);
});
});