2021-04-30 10:33:36 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
|
2021-05-13 20:28:33 +01:00
|
|
|
import PayoutsSummaryTable from '@/app/components/payouts/tables/payoutSummary/PayoutsSummaryTable.vue';
|
2021-04-30 10:33:36 +01:00
|
|
|
|
|
|
|
import { NodePayoutsSummary } from '@/payouts';
|
|
|
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
|
|
|
|
|
|
|
const localVue = createLocalVue();
|
2021-08-02 18:09:54 +01:00
|
|
|
|
2021-04-30 10:33:36 +01:00
|
|
|
localVue.use(Vuex);
|
|
|
|
|
|
|
|
describe('PayoutsSummaryTable', (): void => {
|
|
|
|
it('renders correctly', (): void => {
|
|
|
|
const nodePayoutsSummary = [
|
|
|
|
new NodePayoutsSummary('1', 'name1', 5000, 4000),
|
|
|
|
new NodePayoutsSummary('2', 'name2', 500, 1000),
|
|
|
|
];
|
|
|
|
|
|
|
|
const wrapper = shallowMount(PayoutsSummaryTable, {
|
|
|
|
localVue,
|
|
|
|
propsData: { nodePayoutsSummary },
|
|
|
|
});
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|