storj/web/multinode/tests/unit/mock/store.ts
Egon Elbre 5e24060b25 web/multinode: switch to eslint
tslint has been deprecated so it's nice to switch to eslint.
Currently this uses a minimal eslint, to get things up and running.

Change-Id: If0ca6413b534b0aa15f6130a0a809e002d817356
2021-08-03 13:00:15 +03:00

66 lines
2.1 KiB
TypeScript

// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
import Vuex from 'vuex';
import { BandwidthClient } from '@/api/bandwidth';
import { NodesClient } from '@/api/nodes';
import { Operators as OperatorsClient } from '@/api/operators';
import { PayoutsClient } from '@/api/payouts';
import { StorageClient } from '@/api/storage';
import { BandwidthModule } from '@/app/store/bandwidth';
import { NodesModule } from '@/app/store/nodes';
import { OperatorsModule } from '@/app/store/operators';
import { PayoutsModule } from '@/app/store/payouts';
import { StorageModule } from '@/app/store/storage';
import { Bandwidth } from '@/bandwidth/service';
import { Nodes } from '@/nodes/service';
import { Operators } from '@/operators';
import { Payouts } from '@/payouts/service';
import { StorageService } from '@/storage/service';
import { createLocalVue } from '@vue/test-utils';
const Vue = createLocalVue();
Vue.use(Vuex);
const nodesClient: NodesClient = new NodesClient();
export const nodesService: Nodes = new Nodes(nodesClient);
const nodesModule: NodesModule = new NodesModule(nodesService);
const payoutsClient: PayoutsClient = new PayoutsClient();
export const payoutsService: Payouts = new Payouts(payoutsClient);
const payoutsModule: PayoutsModule = new PayoutsModule(payoutsService);
const bandwidthClient = new BandwidthClient();
export const bandwidthService = new Bandwidth(bandwidthClient);
const bandwidthModule: BandwidthModule = new BandwidthModule(bandwidthService);
const operatorsClient: OperatorsClient = new OperatorsClient();
export const operatorsService: Operators = new Operators(operatorsClient);
const operatorsModule: OperatorsModule = new OperatorsModule(operatorsService);
const storageClient = new StorageClient();
export const storageService = new StorageService(storageClient);
const storageModule: StorageModule = new StorageModule(storageService);
const store = new Vuex.Store({ modules: {
payouts: payoutsModule,
nodes: nodesModule,
operators: operatorsModule,
bandwidth: bandwidthModule,
storage: storageModule,
} });
export default store;