c5bca894fd
Added imports linting, trailing commas, trailing semicolons, single quotes and spaces between curly braces. Change-Id: I5de5d3eea48753dfe2737983b230bafaffe898c8
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
// Copyright (C) 2020 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import { createLocalVue, mount } from '@vue/test-utils';
|
|
|
|
import { RouteConfig } from '@/router';
|
|
|
|
import HistoryDropdown from '@/components/account/billing/HistoryDropdown.vue';
|
|
|
|
const localVue = createLocalVue();
|
|
|
|
describe('HistoryDropdown', (): void => {
|
|
it('renders correctly if credit history', (): void => {
|
|
const creditsHistory: string = RouteConfig.Account.with(RouteConfig.CreditsHistory).path;
|
|
const wrapper = mount(HistoryDropdown, {
|
|
localVue,
|
|
propsData: {
|
|
label: 'Credits History',
|
|
route: creditsHistory,
|
|
},
|
|
directives: {
|
|
clickOutside: {},
|
|
},
|
|
});
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
|
|
it('renders correctly if balance history', (): void => {
|
|
const balanceHistory: string = RouteConfig.Account.with(RouteConfig.DepositHistory).path;
|
|
const wrapper = mount(HistoryDropdown, {
|
|
localVue,
|
|
propsData: {
|
|
label: 'Balance History',
|
|
route: balanceHistory,
|
|
},
|
|
directives: {
|
|
clickOutside: {},
|
|
},
|
|
});
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|