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

40 lines
1.1 KiB
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
import { createLocalVue, shallowMount } from '@vue/test-utils';
import UsageArea from '@/components/project/usage/UsageArea.vue';
const localVue = createLocalVue();
describe('UsageArea.vue', () => {
it('renders correctly', (): void => {
const wrapper = shallowMount(UsageArea, {
localVue,
propsData: {
title: 'test Title',
used: 500000000,
limit: 1000000000,
isDataFetching: false,
},
});
expect(wrapper).toMatchSnapshot();
});
it('renders correctly if used > limit', (): void => {
const wrapper = shallowMount(UsageArea, {
localVue,
propsData: {
title: 'test Title',
used: 1000000000,
limit: 500000000,
isDataFetching: false,
},
});
expect(wrapper).toMatchSnapshot();
expect(wrapper.find('.usage-area__remaining').text()).toMatch('0 Bytes Remaining');
});
});