storj/web/satellite/tests/unit/common/VBar.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

34 lines
822 B
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import { mount } from '@vue/test-utils';
import VBar from '@/components/common/VBar.vue';
describe('VBar.vue', () => {
it('renders correctly', () => {
const wrapper = mount(VBar, {
propsData: {
current: 500,
max: 1000,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if current > max', () => {
const wrapper = mount(VBar, {
propsData: {
current: 1000,
max: 500,
},
});
expect(wrapper).toMatchSnapshot();
const el = wrapper.find('.bar-container__fill').element as HTMLElement;
expect(el.style.width).toMatch('100%');
});
});