storj/web/satellite/tests/unit/project/summary/SummaryItem.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

47 lines
1.2 KiB
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import { createLocalVue, mount } from '@vue/test-utils';
import SummaryItem from '@/components/project/summary/SummaryItem.vue';
const localVue = createLocalVue();
localVue.filter('centsToDollars', (cents: number): string => {
return `$${(cents / 100).toFixed(2)}`;
});
describe('SummaryItem.vue', (): void => {
it('renders correctly if not money', (): void => {
const wrapper = mount(SummaryItem, {
localVue,
propsData: {
backgroundColor: '#fff',
titleColor: '#1b2533',
valueColor: '#000',
title: 'test',
value: 100,
isMoney: false,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if money', (): void => {
const wrapper = mount(SummaryItem, {
localVue,
propsData: {
backgroundColor: '#fff',
titleColor: '#1b2533',
valueColor: '#000',
title: 'test',
value: 100,
isMoney: true,
},
});
expect(wrapper).toMatchSnapshot();
});
});