2021-04-30 10:33:36 +01:00
|
|
|
// Copyright (C) 2021 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import Vuex from 'vuex';
|
2022-11-04 11:57:05 +00:00
|
|
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
2021-04-30 10:33:36 +01:00
|
|
|
|
|
|
|
import { NodePayoutsSummary } from '@/payouts';
|
2022-11-04 11:57:05 +00:00
|
|
|
|
|
|
|
import PayoutsSummaryTable from '@/app/components/payouts/tables/payoutSummary/PayoutsSummaryTable.vue';
|
2021-04-30 10:33:36 +01:00
|
|
|
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
});
|